I have come across this two sticky-session library for node js
https://github.com/indutny/sticky-session
https://github.com/wzrdtales/socket-io-sticky-session
What is the difference between two, My need is just to achieve socket with node clusters, and also in future if i want to add Ngnx Server.
In Socket.io Documentation they have mentioned about the former one, But this link
Socket.io 'Handshake' failing with cluster and sticky-session
says that second one is better !
Recently, I found sticky-cluster and this module has a very easy implementation.
The benchmarking is very good and their description says: up to 10x faster and with much better scattering than
sticky-session
module.Example code: