I scaled SSE to 150k connections (blog on the issue, process and final fix)

2 pointsposted 8 hours ago
by pranshu-raj-211

2 Comments

pranshu-raj-211

8 hours ago

I built a real time leaderboard that uses SSE (Server Sent Events) as the main access pattern. When I tried to scale it I hit a limit of 28232 connections, with resource usage being nominal.

This was very peculiar, and the post describes my journey figuring out the cause of the issue and how I went past that limit, eventually scaling to 150k connections on a single machine (and my ideas on how to take this further, as I hit memory limits at this point).

pranshu-raj-211

8 hours ago

For context, this system was built in Go, Docker being used both by the server and client components. All the testing was done on a laptop running Fedora Linux.

I'd love to learn how this can be taken further, especially how to handle request spikes and reducing memory usage.