Our great sponsors
-
Redis
Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs, Bitmaps.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
We are using nodejs for our backend code and socket.io library for real-time communication. Our server is deployed on an AWS EC2 instance. Currently, we are not able to scale more than 200 concurrent socket connections. How can we scale it? What is the best practice to implement socket.io for this scale?
Ideally you'd want a load balancer in-front of your application and then route it to multiple redundant and stateless instances of your web application that would only relay information to the client using some sort of in-memory centralised data store, as an example setup.
Try this instead: https://github.com/uNetworking/uWebSockets.js/
Related posts
- Recommendations for a CPP HTTP server which supports changing max threads at run time.
- WebSocket Server in C
- In the 1970s, programming was an elite's task. Today programming is done by uneducated "farmers" and as a result, the care for smart algorithms, memory usage, CPU-time usage and the like has dwindled in comparison.
- uWebSockets
- uWebSockets