Need opinions on how you think scaling my setup would be done best (Featuring socket.io)
Hey,
I am currently working on a website thats ran with php (hhvm + nginx). One part of the website features realtime data, so im using node + socket.io for that.
The problem: The node serverapplication features something which can only be initialized once, but i need it, so simply forking the process and doing loadbalance in nginx is not an option. I have never worked with loadbalancing in node and hoped that its not required, it is though.
I would like to stay with socket.io, as what i see now, one instance can hold up at least 3k clients at the same time, after that the latency of socket.io keeps rising and rising...
Whats possible on node's side is done already(exposing the GC and calling it in appropriate places, using the nouse-idle-notification, ...), but yeah, going multiprocess seems to be the only futureproof solution.
TL;DR Have something that can only be intialized once, need multiple instances of programm because of socket.io, all instances need to access the only once initialized thing, never worked with loadbalancing in node. Help?
Posted Aug 12, 2015, 4:25 PM UTC