I have created a 3-node cluster. I use keepalived to publish a single ip address for the cluster. I have 3 instances of node-red running, one on each node, all sharing the same set of flow files and settings.js.
When I go to update a flow either using the keepalived ip address or a single node ip address, it seems as if the synchronization is getting confused. I do have multiplayer enabled.
Is what I am doing even doable? Am I missing something?
Typically keepalived is used to share an IP address between different hosts. This is useful for incoming connections. Is that what your flows are doing and only this ?
When you deploy the flows, is there a chance that affects what is used by keepalived to assess that everything is normal ?
So that the IP address is moved to another host... Hence the potential confusion.
I agree with your take on keepalived. My thought that with multiplayer turned on and the node-red files being shared, that node-red would take care of changes no matter where they came from. Maybe I am misunderstanding what multiplayer does. I thought it was to synchronize node-red when multiple people were making changes. So I am thinking that it doesn't matter which node-red that keepalived sends me to to do my edits. That the rest would just sync up so when a query came in it too would not matter which node-red was queried.
Multiplayer mode lets multiple browsers see what other browsers are doing to a single back end server. IE many clients to one server. I think what you are describing is several servers trying to stay in sync by sharing a flows (and settings) file.
That is not the same, and is not supported.
One reason being that when you hit deploy, only the instance that currently has the ip address will get the restart request. It will rewrite the updated flows file, but it can’t tell the other servers to restart.
So I make a change on node1 (I turned authentication off for testing) and created a http POST node with the correct headers to reload the flows for node2. I am getting a v1 204 success but the flows are not getting reloaded on node2.