Friday, May 7, 2010

searching, doing, thinking, and all other nonsense

At $WORK, a couple of guys are working on setting up HA cluster for apache load balancers. Currently the set up is like this:

Internet ---> Apache(mod_jk) --> Tomcat/Jboss cluster.

They would like to have two apache (mod_jk) and have a hot standby apache of sorts. They are setting up agents for heartbeat, and ldirector, etc.

This is what happens when you search the internet for apache HA, and you end up with some tutorial and then with a complex setup.

These guys have some network device that can do load balancing (VIP ---> Apache1, Apache2); they are not ignorant of this fact. What they are ignorant is, is how mod_jk works and how sticky sessions work with backends.

Apache mod_jk doesn't store session ids, like Jsessionid. The tomcat cluster adds Jvmroute entry to session id, which is same as worker name in mod_jk. Upon looking at the session id, mod_jk routes that request to the proper backend (jboss/tomcat).

You don't need so-called HA solution if you have a device that supports LB and a minimal health checkup.


Netowkr device (VIP) ---> Apache_mod_jk1, Apache_mod_jk2 ---> Tomcat cluster. Make sure that worker.properties for both Apache_mod_jk* is same. You are done with it.

No comments: