I’m trying to figure out how to balance websocket connections across several servers using haproxy.
It looks like the leastconn balancing algorithm seems a good idea for this.
I understand that this means that when a new websocket connection is being established (i.e. connected), haproxy will assign this to the server with the least connections.
However, what happens while the connection is open (and after haproxy initially assigned it to the server with the least connections)?
Would haproxy reassign the server anytime a packet flows over the open websocket connection, or only when a new websocket connection is being established?
Thank you very much!