-
1. Re: mod_cluster and HTTPD virtual hosts (again...)
jfclere Nov 23, 2011 3:50 AM (in response to syncmaster2009)1 of 1 people found this helpfulIn fact the mod_cluster mapping won't interact well with the proxy in this case: it will process the request before the proxypass and route the request according its information Alias and Context. (Use UseAlias directive).
-
2. Re: mod_cluster and HTTPD virtual hosts (again...)
syncmaster2009 Nov 23, 2011 8:57 AM (in response to jfclere)Ok, so what this means is that before virtual sites and/or proxypass directives are processed, mod_cluster has already defined the destination nodes for the request, hence all deployed applications in any JBoss cluster will appear in all virtual sites. Is this correct?
If so, how can I do isolation ?
-
3. Re: mod_cluster and HTTPD virtual hosts (again...)
jfclere Nov 24, 2011 2:27 AM (in response to syncmaster2009)Use the Alias in the Host and UseAlias directive to get mod_cluster doing the whole routing.
-
4. Re: mod_cluster and HTTPD virtual hosts (again...)
syncmaster2009 Nov 24, 2011 6:05 AM (in response to jfclere)Ok, thank you.
It does work, setting the name in server.xml of jbossweb.sar to coincide to the DNS name and the Apache virtual site, and using the directive UseAlias 1, does the trick.
Requests to dns name cluster1 go to the Apache Virtual site cluster1 and are only delivered to the members of Jboss cluster1 by using those configuration and directives.
But there are at least two issues to this configuration...
1st) The excluded contexts like web-console, juddi, and so on are available now on the Apache mod-cluster frontend, while previously they weren't.
I've tried several settings on mod_cluster xml file on the exclude contexts, like cluster1:web-console, cluster1:admin-console, but it doesn't work. It seems this is a bug that will be solved on 1.1.4 release?
2nd) It seems that no stick session is done by mod_cluster... it just load balances between nodes even after setting up a session and setting the JSESSIONID cookie value.
One thing strange was that previously the cookie had at the end the JVM route like yTN2Dakg_.Route1 and now it has nothing, it's just like yTN2Dakg__.
Previously after creating a session, it would stick at the same node. My ProxyPass directive is the same and it is:
ProxyPass / balancer://cluster1/ stickysession=JSESSIONID|jsessionid nofailover=On
-
5. Re: mod_cluster and HTTPD virtual hosts (again...)
syncmaster2009 Nov 24, 2011 6:17 AM (in response to syncmaster2009)Resolution for the 1st issue can be done by adding the following to the apache virtual host configuration:
ProxyPassMatch /admin-console !
ProxyPassMatch /web-console !
ProxyPassMatch /juddi !
And so on...
Now the 2nd issue still happens, no sticky sessions even with jvmRoute defined, and without any ProxyPass directive...
-
6. Re: mod_cluster and HTTPD virtual hosts (again...)
syncmaster2009 Nov 24, 2011 5:11 PM (in response to syncmaster2009)Well it seems that you need to define the jvmRoute in two ways:
-Djboss.jvmRoute as to allow sticky sessions
-Djboss.mod_cluster.jvmRoute to the same value as above but only to show a human readable name on the mode-cluster-manager page. I don't think it does anything else.
With -Djboss.jvmRoute defined, sticky sessions do work with virtual hostnames.