ProxyRequestsOn ProxyPassReverse / http://server_one:8080/ ProxyPassReverse / http://server_two:8080/ ProxyPassReverse / http://server_tree:8080/ </VirtualHost> the file rproxy.conf contains: www server_one:8080|server_two:8080|server_tree:8080 So far, so good. I can access http://server/ and mod_rewrite randomly chooses one of the servers ant distributes request to it. It is reverese proxied to http://server/context, so the end user is not aware for the real name of the server. But the problem is that there is no mechanism like "sticky sessions" provided (like in ajp13), so once I log in.. i the next request I am happily distributed to other server where no session is exported. Can someone help me with any idea on how to overcome this? Is there a mechanism of Session Replication in JBoss. Any suggestions, links, literature. Thanks in advance. [ July 11, 2003: Message edited by: Deyan Sultov ]
I found the answer: RewriteMap element can distribute load between them. But since Apache is not a load-balancer and no mechanisms like "sticky session" is supported (as in ajp13) each successive request can end up on a new server where session is lost. Thats why we have to implement clusterind and HTTP Session replication: 1. Ensure that jbossha-httpsession.sar is found in \all\deploy. 2. Ensure that cluster-service.xml is found in \all\deploy and properly configured. 3. Add to \all\deploy\jbossweb-jetty.sar\META-INF\jboss-service.xml <Set name="store"> <New class="org.jboss.jetty.session.ClusterStore"> <Set name="actualMaxInactiveInterval">604800</Set> <Set name="scavengerPeriod">3600</Set> <Set name="scavengerExtraTime">900</Set> </New> </Set> 4. Add to web.xml <web-app> <distributable/> ....................... <web-app> 5. Run jboss with run -c all parameter.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop