Rainer Jung wrote:
Hi,
Nahor wrote:
Hi,
Is there a way to specify at runtime what worker the load-balancer
should use first?
For some request, we can't use cookies so we pass the session id via
the URL or via the query string. We then force the worker using
RewriteRule and the JK_WORKER_NAME env var.
But then the request doesn't pass through the load-balancer anymore.
So even if we stop that worker in the load-balancer, it will still
receive the request instead of being redirected to another worker.
So is there a "JK_LB_PREFERRED_WORKER" kind of variable or equivalent
that the load-balancer would use instead of the cookie?
Not directly, you could make use of the cookie and url encoding routing
facilities of an lb though.
- Make sure the JSESSIONID gets deleted before and the new request
doesn't contain a wrong ;jsessionid URL encoding
- Either use mod_headers to set a fake JSESSIONID Cookie header to the
request
I can't set a fake cookie because we want to be able to set the cookie
in the response if it was missing in the request (for instance, when
switching from HTTPS (and secure cookies) to HTTP).
- Or use mod_rewrite and append a fake ;jsessionid=... URL encoding at
the end of the URL (but before the query string).
Thanks, I didn't think about rewriting the request.
Let us know if this works :)
It does! Thanks! :)
Nahor
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]