Get the latest tech news
The hidden complexity of scaling WebSockets
WebSockets are at the very core of Compose. Learn how we scaled them to support 1000s of concurrent users.
Since WebSocket connections are persistent, this can lead to situations in which old servers are active for minutes or even hours after a deploy until the managed service forcibly terminates the process. By monitoring heartbeats on both ends, we detect and handle rare cases where the client side network appears functional but the server never receives responses. To mitigate such issues, Compose uses server-sent events (SSE) as a fallback for receiving updates, while HTTP requests handle client-to-server communication.
Or read this on Hacker News