-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make connections sticky to a node instance behind the LB #220
Conversation
Frankly I don't see great utility in supporting LB schemes that are relevant for one physical machine only. Plus the cluster functionality is labeled "experimental", and actually gets in the way when wanting to scale across machines. How many apps and PAAS are actually using the cluster functionality? |
I understand you are not using |
This PR still doesn't work as advertised since you're not targeting the initial socket open request (and the following reconnections) - so it's currently an attempt at "sticky connections" rather than connection targeting. |
@mokesmokes Initial socket open request doesn't need to targeting. It should be targeted by load balancer. What you mean about connection targeting? |
@mokesmokes I have updated PR title. |
@crzidea take a look at my PR for what I mean. LB is normally a dumb beast that has no clue about the application, and frequently we app devs have no control over it a priori (e.g. in PAAS deployments). In my app, for instance, I tell the client which server to hit (i.e. which server has his "app context" active) - I can't leave this decision to the LB which has no clue. Making these decisions "intelligently" instead of relying on LB's load balancing makes a huge difference in scalability. Thus to "target" connections one must take care also of all |
@mokesmokes This is third time I tell you cookies was not supported with cross domain JSONP even by IE10. I'm dealing with it. |
You don't need cookies to support sticky sessions. You can also stick the session to a specific client IP address and this is how it's often done. |
@mokesmokes That is not reliable. And we have to test it with 1M clients connections on a sigle 64G memory machine. IP based load balancing just targeting all of them to one node instance.That is a terrible way. |
Already solved with following way: |
To support socketio/engine.io#207
Load balancers can use worker id to target a specific node instance behind the LB.