In coding, there's a lot of "yes, you really can do that."
For example, need to broadcast a message to 20,000 WebSocket clients?
You do a for-loop. Yes, you really can do that.
In coding, there's a lot of "yes, you really can do that."
For example, need to broadcast a message to 20,000 WebSocket clients?
You do a for-loop. Yes, you really can do that.
Good to know. Starting to use websockets more intensively. Thanks.
Curious as to how many concurrent clients you support and how to resource-size accordingly?
>how many concurrent clients you support
At least 1,048,576.
You will most likely hit filesystem limits of the OS before you hit network or memory limits. Keeping an idle websocket open uses basically no CPU. And if you're just punting off their requests to some database, even active connections won't hit CPU limits of modern equipment. Your database on the other hand...
lol. My service is being designed to support up to 4,294,967,296 unique clients, though I don’t think I’ll be able to convince half the world’s population to use a single service instance.
Good info on the websockets. Thx.
If you get to that point, just run multiple servers, and use some DNS tricks to get traffic routed to different servers based on the user's location.
Yup.
I’ve architected everything so that I can take advantage of that cool infrastructure stuff. Already in discussions with an ops friend that does this for a living.
while {} ftw
And looking into the future, could WebTransport become a thing? It will support multithreading / concurrency within a subscription / open connection.
We couldn't even get WebSocketStream working, and support for WebSockets across all tools and languages is still pretty bad as it is. I'll believe it when I see it. 😃
Noted. I’ll keep it insight 😃 Meanwhile we keep challenging WebSockets 🤙🏻
People often complain that making Java fast means writing C-like Java. Guys: that's a feature, not a bug.