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?
2 Answers
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.

- 37,405
- 5
- 53
- 95
There are many web services load-balancing solutions available...
- Many companies use F5 BigIP LTM for load-balancing solutions.
- Cisco's ACE is also an option; see this ACE link if the original above is dead (which Cisco seems to do almost monthly)
There are a few open-source solutions as well...
- HAProxy
- loadbalancer.org - An appliance that uses HAProxy, and includes commercial support
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.

- 8,305
- 9
- 44
- 87