Thank you for your reply.
I can definitely enable ‘sticky sessions’ on the AWS LB. So if I understand you correctly (and my conclusions):
- the HTTP request can in principle go to any target, it could even go to a random target for every new request, but using sticky behavior is advised.
- for the WebSocket connection one has to insure it always goes to the same target because that’s where the Document instance lives (I don’t know WebSocket connections, this might be an implicit requirement of the implementation?).
- if a target is removed because it’s unhealthy or is down-scaled (not sure what the behavior is when there are still active WebSocket connections, probably it would only be stopped once all connections are drained), BokehJS would display the ‘connection disconnected’ entry in browser log.
- Sticky sessions is advisable because it would insure one user can only ‘block’ one target, which simplifies scaling. Also if a target becomes unhealthy, the user will be routed to a healthy target and a new document/session will be created.