Solutions to handle thousand or million socket connections

currently I have deployed a Django project on EC2 server which has a RAM of about 2GB using Gunicorn and Ngnix, I have also WebSocket's using Django channels on same server, so as of now we have around 200 active users. currently each user will have 5 active WebSocket connections/consumers (for chat, notification, etc.) open so currently around 1000 open connections are present at a time. As of now WebSocket's are working fine but in future we are expecting a growth in user so as the active WebSocket connections will grow, and at some point, due to excessive load, the server will start throwing issues regarding socket connections my question is how to solve this situation.

is moving socket clients to another server a good solution? or should I increase my current servers RAM? basically i don't know what to do to solve this issue if this occurs in future

Back to Top