Using Mongo as a queue for load balanced Node/socket.io enviroment
Clustering socket.io can be a bit of a mess. Each server (and in node’s case each process on the server) has it’s own pool of socket.io connections that are connected to clients. Keeping two processes in sync to keep everything real-time can be a bit of a scaling headache. This is a small prototype using mongo’s capped collection as a event bus across many processes. This seems like a reasonable solution because the bottleneck is Mongo which is known to scale well.