Automattic/socket.io — pull request #1815 by objectiveSee (2014-10-07 21:35:34+00:00)
Title: Chat example using Cluster + Redis Adapter

I have forked the chat example and made it work using Cluster. There is an updated README within the example's directory that instructs you on how to configure Redis.

My solution used the `sticky-session` module (https://github.com/indutny/sticky-session) for routing requests to a slave based on IP address. This means that if you want to test this application, you will need to hit index.html from different machines in order to see requests hitting distinct slaves.

I unfortunately had to drop support for showing the number of connected users in the chat room. I believe that in Socket.IO 1.2.0(https://github.com/Automattic/socket.io-adapter/pull/5) there will be support for listing the number of connected clients, and therefore being able to get the count.

I would love some feedback from the project maintainers about how I did on using cluster, and whether my solution is in-line with their vision on the best practice for scaling Socket.io across multiple nodes.