4 ms·
We are using uWS for our platform which is completely written in native C++. I haven't tested the scalability to a million clients, but I have no reason to dou
by socmag 10y ago
We are using uWS for our platform which is completely written in native C++.
I haven't tested the scalability to a million clients, but I have no reason to doubt it could handle it.
On the other hand, I have tested with 20k clients each sending 100 x 128 byte messages a second.
So I've tried pumping 2 million messages a second through our platform (which is at the envelope of my expected load), and the server just sits there and takes it. At these levels saturating the network interface is the main issue.
I've also tried it in single core, 4 core, 8 core and 20 core threaded configurations. Everything works as it should and contention is quite minimal.
The ability to achieve that over WebSockets is largely due to the work Alex has done (and continues to do) to squeeze every last ounce out of the stack.
As far as I'm concerned uWebSockets 0.10.0 is rock solid and at the point where using it in production is totally fine.
I can totally recommend it.
Congrats on the release Alex and thanks for the lib!
- Matthias247 10y agoDid you also perform some tests with slow clients (or ones that do not receive data at all)? These are the situations where it usually gets a lot more interesting. E.g. if the library just buffers messages all the way until they can be sent you might get out of memory sooner or later.
- socmag 10y agoAh well we have high level policy to deal with obnoxious clients. We will forcibly boot a client if it exceeds certain limits. This is imposed at the application layer. But no I haven't explicitly tested with thousands of leaky clients.
- alexhultman 10y agoYou can register callbacks to the send calls so that you can keep track of the built up "to be sent" message queue.