Closed vinnitu closed 12 years ago
But what about cluster? i mean http://nodejs.org/api/cluster.html
With cluster, you are essentially fork()ing processes. Similar to what you would do if using nginx as a reverse proxy and making the sessions sticky in some way.
It is not very clear to me how cluster manages to ensure that multiple requests from the same client will be routed to the same bosh server instance.
I think master node can works like nginx module. No?
No idea - I couldn't find that info. anywhere on the project page.
In the long term though, it probably makes sense to support the cluster since I can imagine that people would want to run a cluster of bosh proxies.
For the near future though, the cluster API is highly unstable and subject to change. I'll reopen the issue when the API stabilizes.
On second though, it seems that the sticky-session functionality is something that is application specific and will have to be programmed in by the programmer in the http serving function as shown in the example on this page: http://nodejs.org/api/cluster.html
Nope, node.js is single threaded.
You can however start multiple instances of the bosh server and reverse proxy using nginx and the nginx-sticky-module (mentioned in README.md).