Tomcat – Alternatives for load balancing Tomcat webapp

clusterload balancingtomcat

We wish to enable some form of load balancing for a Tomcat webapp we're currently using today. Unfortunately, I know almost to nothing about Tomcat load balancing, clustering and so on.

Can anyone share resources that cover the different alternatives, give some handy pointers (maybe some solutions work better in certain types of environment?) or just some tips on solutions to try out? We're currently running Tomcat 5.5 if that makes any difference in features, however no critical obstacles for upgrading to 6.

Best Answer

Many ways to achieve this...It will depend at least on:

  • Do you use context/session state that must be saved if one server/tomcat crash ?
  • Do you accept commercial solutions ?

Some solutions (from cheapest/simple to costly):

DNS Round robin: client get one server ip, the next client the other and so one.

Windows: NLB. Comes with Windows, free.

Linux: LVS (Linux Virtual Server)

Commercial: Safekit from Evidian

Appliance: F5, Alteon, Radware

You couls also use Apache as a front end to spread load