Skip to content
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

Question: cookies useless in cluster balancer ? #112

Open
welelay opened this issue Jan 28, 2016 · 0 comments
Open

Question: cookies useless in cluster balancer ? #112

welelay opened this issue Jan 28, 2016 · 0 comments

Comments

@welelay
Copy link

welelay commented Jan 28, 2016

I've put a lot of console.log in balancer/route.js and can't figure out how cookies are used in cluster.

cluster-endpoint cookie

It seems endpointHash retrieved from cookies is always null in route.js#43.
I can't find a place in cluster where a cookie is set to just 'cluster-endpoint' so it seems to be useless to check for it.

I'm using cluster to load-balance between 2 instances of the same app (2 machines, both export the 'web' service).
By ignoring cookies, a new instance is picked at random for each request from the same client.
I thought it would assign the same client the same instance.

cluster-endpoint::web cookie

The client dutifully sends a cluster-endpoint::web cookie on each request, and the server responds with a same or different one at random.
Only when the service is the ui service is the cookie read, it seems utils.js#L91, but the client never sends /web/sockjs/info queries so again it seems to be useless.

Is it due to my configuration, or to support microservices, or a leftover ?
Please help me understand..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant