Flows are not displayed when the number of Node-red app instances is 2 in IBM Cloud. When I changed it back to one instance, the flows were shown. Is this a limitation?
-
There is no such limitation afaik. Are you using the Node-RED Starter Boilerplate and "Node-RED on IBM Cloud" to edit the workspace? – briadeus Dec 20 '18 at 11:39
-
Yes. That is right. – enak Dec 21 '18 at 05:34
-
Could you explain in more detail what you see instead? The "Go to your Node-RED flow editor" is not active? – briadeus Dec 21 '18 at 10:10
-
I can click "Go to your Node-RED flow editor" and login panel is displayed. After that, sometimes it goes back to login after entering correct login/password. Sometime it shows blank after login. Occasionally I can see Node-Red on the top but content is empty. If I change instance back to 1, everything works. – enak Dec 26 '18 at 01:25
-
@briadeus Can this be considered as a defect? – enak Jan 09 '19 at 01:02
-
I think this is rather related to your browser/system configuration or maybe even the location of your service, for us it worked without problems. – briadeus Jan 09 '19 at 09:04
-
Are they both linked to the same Cloudant database service? Or to a different one? – Arlemi Jan 16 '19 at 09:18
1 Answers
Yes, this is a limitation.
When you have multiple instances of the same node-red application running, http requests are load-balanced between the instances.
If you have security enabled, the instances do not share a session cache, so when the editor loads, the http requests it makes will be spread between both instances. If the request to load your flows hits the instance that didn't handle your login, it will reject the request. You will probably have an error message in the browsers javascript console.
Even if you disable authentication, it is still problematic when you deploy changes. The request to deploy will hit one instance. That instance will update storage with the new flows and restart itself. The other instance won't know the update has happened and will continue to run the old flows.
Today, the only reliable way to edit a node-red instance in IBM Cloud is to fall back to a single instance.
The other option is to take a more dev-ops like approach and develop your flows outside of the IBM Cloud and deploy changes in a more controlled manner. This blog post series describes how you could do that.

- 9,777
- 2
- 28
- 35