i was wondering if it is possible to load balance and create a high availability environment using network switches? Or do i need a real apache server in front of the tomcat servers?
migrated from stackoverflow.com Jul 12 '11 at 15:39
This question came from our site for professional and enthusiast programmers.
To expand on Guacamole's answer a little bit.
Proper switch design is a large part of a proper HA solution. However, you are working at the wrong level to think that they will make your tomcat installation HA. Switches are a Layer 2 (sometimes also 3) device, while you are talking about making layer 7 HA.
To get a proper HA solution in place, you need to take a look at your stack from the ground (Layer 1) up (layer 7) and ask your self "what would happen if this piece of the stack no longer existed." Then you can start to design a scalable HA solution for your stack.
There are many great options out there from the paid F5 and Cisco gear to the Open Source HAProxy, LVS, etc. But first you need to evaluate your entire infrastructure and find out exactly where your single points of failure are and put the right solutions in. You may find after doing some evaluations, that there are products that will fix multiple SPoFs that you would have overbought for otherwise.
There are many web services load-balancing solutions available...
There are a few open-source solutions as well...
The real answer to the question depends on how you plan to load-balance... will it depend on your server's http response time, CPU utilization, bandwidth, per-http-session, etc... The options above may or may not be so great at your particular use-case... although as a general solution, it's hard to beat F5.