Use of websockets when backend is running on multiple EC2 instances
LuchsHub opened this issue · comments
Currently, all active websocket connections are tracked by the ConnectionManager manager in the backend.
https://github.com/53845714nF/EventTom/blob/main/backend/app/api/websockets.py
For Cloud Computing, an ALB with multiple EC2 instances has been suggested. If some websocket connections are established with one, some with another, then neither instance will know all websocket connections. This is problematic, because update messages should be sent to all websockets.
Do you have an idea of how to solve this yet?
I don't think we've even got to that problem yet.
I would set it up like this for the time being as it works 90% of the time.
It's also a nice error that you can pack into a presentation. To finally solve this, we would probably have to write a database function that the backend listens to.