How much does network latency affect Node-RED?

We've got a Node-RED Docker instance deployed to a customer site on a small embedded Linux computer. It's an identical installation to around 50 other customers, nothing unusual, but this customer has very high network latency, pings around 3000ms vs 50ms for all others on our VPN.

I suspect because of this Node-Red struggles to load. Sometimes it does, but most of the time, a blank page titled Node-RED without even a 404 or anything just sits there. Does anyone else have experience with issues like this, or deploying Node-RED to high-traffic / low speed networks? I am more accustomed to static web apps, where either the JS loads and works from the client machine, or it 404s - is Node-RED sufficiently dependent on the server's local network that it can struggle to work at all like this?

Any similar experiences or advice would be appreciated. Many thanks!

This is the sort of thing we're seeing:

When Node-RED does load, most of the dials will be blank, except for a little historical data from indeterminate points in time where it works. The Node-RED server's LAN seems to ping ok, and it's on a private LAN with the sensors, so no idea why the data isn't just displayed, even if it takes a while to load on the client side via VPN.

So to clarify, this is regarding a Node-RED Dashboard rather than the editor itself? What version of dashboard are you using?

All of the data passing to the dashboard is handled over a websocket, rather than individual http requests. I'm not sure why a high network latency would impact the data getting there eventually - unless the socket is timing out and reconnecting, triggering a resend of the data which then timesout and cycles again.
Can you check the network tab of the browser developer tools for any 'unusual' behaviour or errors in the console?

1 Like

The Dashboard and the Editor both have the same symptoms. I haven't seen anything terribly unusual in the console; Node-RED is v3.1.9. It is loading OK at the moment; latency is acceptable, but I will keep an eye on it and post back later when I see the issues reappear.


3second pings!!! Ouch! I don't believe I've EVER seen a ping like that. :scream:

One thing I noted in that network list you shared was that your websocket connections seem to be dropping out after a fairly consistent 1.5 minutes. Not sure if that is significant but it looks odd to me.

1 Like

I had something similar:

For school I had to create a VM with Debian on which I installed NR (bonus part).
Because the school PCs can't support the size of the VM, I have to put it on the school's network drive. When launching Node-RED it took almost 5 minutes for the workspace to completely load. I had a white screen like you. Of course, running the VM directly on my PC does not cause this behavior.

1 Like

That school network drive, guessing that was a high-traffic network. Sounds exactly like our situation.

I do know the customers are going to be upgrading their network over the next month or so, hopefully that will fix it. While I was there on site, commissioning the installation, I checked most of the critical ethernet wires (10-20m) that we'd wired ourselves and they worked fine. (only wires I didn't check were prefab)

Sometime today, I'll set up a more permanent online-check server and keep a better monitor on it, and post back soon. Are there any workarounds or lite "HTML-only" compatibility views in Node-RED that we could use, anyone know

EDIT: Here's one screenshot from when it was struggling to load, despite the network latency looking OK. I'm seeing 404 on loading.html...?

Unless you have created that file yourself,you will always get that error, as it doesn't exist by default.

Never knowingly added or imported loading.html; seems to be included here:

 <body id="nr-dashboard" ng-app="ui" ng-controller="MainController as main" ng-cloak layout="column" style="background: {{main.backgroundColor}}" class="nr-dashboard-theme" ng-swipe-right="onSwipeRight();" ng-swipe-left="onSwipeLeft();" ng-attr-ng-swipe-disable-mouse="{{main.allowSwipe !== 'mouse' ? '' : undefined}}">
        <md-content ng-if="main.loaded" ng-include="'partials/main.html'" layout="column" flex></md-content>
        <div ng-if="!main.loaded && !main.nothing" ng-include="'loading.html'" class="node-red-ui--loading"></div>
        <div ng-if="main.nothing" class="node-red-ui--notabs">
            <table>
                <tr>
                    <td>
                        <center>
                            <img src="icon120x120.png">
                        </center>
                    </td>
                </tr>
                <tr>
                    <td>
                        <center>
                            <h2>Welcome to the Node-RED Dashboard</h2>
                        </center>
                    </td>
                </tr>
                <tr>
                    <td>
                        <center>Please add some UI nodes to your flow and redeploy.</center>
                    </td>
                </tr>
            </table>
        </div>
        <script src="socket.io/socket.io.js"></script>
        <script src="js/app.min.js"></script>
        <script src="i18n.js"></script>
    </body>

It isn't an issue, if you want to provide one then you can, but there is no need. It has no performance impact.