✅ Seeking Suggestions: Efficient and Reliable Real-time Data Update for Thousands of Web Clients
I have an API developed in .NET and several thousand web application clients. Whenever a change occurs to a specific client (e.g., by id), I need to send information about what changed/added. The solution needs to be highly reliable (99.99%) and fast.
Here's what I've considered so far:
1. Push Notifications: I've initially ruled this out because I don't believe they can be 99.9% reliable and consistently fast.
2. Pooling: If I were to go with pooling, I would send queries every second since the data must be super up-to-date. I would use caching and a list with the last change timestamp. However, I'm concerned about the high volume of requests from so many apps and potential cache fragmentation due to multiple machines for load balancing.
3. Websocket: I've discarded this option as I don't need bidirectional communication.
4. Server-Sent Events (SSE): This seems the most suitable for my needs in theory, but I encounter issues when scaling across multiple machines. I've read about solutions using Redis, but it seems to overly complicate matters and increase load.
Any advice or alternative solutions would be greatly appreciated!
29 Replies
SignalR?
Thats under point 4. What I've read, that it gets very complicated when scaling to multiple machines.
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
Polling, not Pooling. Very different things.
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
You also switch between 99.9% and 99.99%. Those are quite different (2 mins downtime a day, vs 8 seconds)
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
I'd pick websockets (or something built on top of them) as my first option to consider. Who cares if you're not using bidirectionary communication? You wouldn't opt to walk instead of driving a car just because you don't have anything to put in the boot...
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
Eh, a computer can have several thousand sockets open
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
Yeah, then the clients can re-establish
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
You lose a few seconds, but that's where the 3 9's vs 4 9's matters
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
You'd close them gracefully, surely? Doing anything else is silly.
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
Looks like the Windows timed-wait timeout is 4 mins? Which is within your 99.9%. "Several thousand" to me means around 2-4 thousand anyway
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
.... cool?
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
thanks to whatsapp a single linux machine can handle much more than that
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
@TeBeClone Thank you very much. About signalR and sse, I've just read somewhere that its build on top of it and websockets.
Anyway, right now it will be around 5 thousand indyvidual clients.
I need 99,9%. It was mistake in the first part of post.
I already have 3 machines on LB so direct websocket is not possible.
I will check if amazon have something similar to azure, if not, I will go for it.
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
I would like asrs because its serverless. Otherwise i think will need at least 2 redis instances so I wont end with SPOF?
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
Great, thank you very much. I will keep reading to discern the topic.
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.