I need to load balance 3 web servers + a db server and I'm trying to figure out what switch/load balance setup I need and I'm a bit confused. I go to sites of Cisco, Nortel, F5, Radware and try to make sense of all the different devices they have, but there are so many damn devices that I still can't figure out what the hell I need.
Is a load balancer the same as a Layer 4 switch?
If I get a load balancer will I still need to get a switch?
If yes, they both have rows of ports, how do I connect the two? Which one is connected to the provider's feed, which one to the servers, and how are they connected together?
If no, anyone know of a fair priced load balancer/switch combo? Is a combo device even a good idea? I've read they are pricier and less reliable.
Stuff like caching, compression, firewall/security, ssl, etc. are all extras that I don't absolutely need (but wouldn't mind having if not big diff in price). All I need is a decent managed L2 switch + a decent load balancer, together or separate. Nothing too complicated. Anyone have model numbers to recommend?
If you are going to run multiple servers, you can take advantage of the software loadbalancer that we have in v3.0.
This is a crude solution that we implemented while we were investigating a hardware solution. This solution does not measure load in each servers when it assigns users to machine. It merely reads a file called servers.fom and decide how users should be distributed among the servers. Before assigning a user to a server, it checks three conditions on that server: if tomcat is running, if the DB connection is available, if AFS is up (at Stanford, all our course directories are located in AFS). If these three conditions are met, the loadbalanacer determined that the server is in heavy state and can be assigned to.
Otherwise it will remove the server from the server list, then check the 3 conditions in the next servers. If all the servers fail, an error meesage will be displayed.Once a user has been assigned, his http requests will be handled by the assigned servers. In other words, its user session is not shared by other servers.
There are three files that you need to create in order to use the loadbalancer: servers.fom, servers.probe.conf and probe.txt.
The locations of the three files are specified in loadbalancer.properties. Place servers.fom and server.probe.conf in a location that is accessible by the web application, e.g. /usr/local/coursework/.
# server.fom - contains the figure of merit of each machine in production eg. (our servers.fom)
coursework-dev2.stanford.edu=LOCAL <-- this server is not in production
coursework-x.stanford.edu=2 <-- user will be assigned to this server 2 times more often
# server.probe.conf - contains the following parameters (our servers.probe.conf).
ProbeResponse="OK" # returned string if all tests OK
ProbeInterval=5 # in seconds (one server each time)
ProbeFailTrigger=1 # how many bad probes before FOM=0
ProbeRecoverTrigger=2 # how many good ones to restore FOM
ConfigReadInterval=300 # in seconds
# probe.txt - contain the text "OK" (see probe.txt) and you must place it under htdocs/ where it is accessible through the web. In production, our htdocs/ is located in AFS. If probe.txt is accessible, it implies that AFS is up and running. The location of this file is specified in the loadbalancer.properties.
Load balancers vary so greatly that personal preference from brand to brand generally plays a great deal into what someone will recommend. I found when purchasing load balancers at a previous job the best way to do it is to contact each company and let a rep contact you and find out exactly what you're looking for, then use their recommendations to atleast narrow down your search. Sure, they'll attempt to oversell you, but they'll recommend more than one model. I ended up going with radware, but again, it's just personal preference.
Go to eBay, you can pick upa decent load balancer for a whole lot less. Our service provider use to charge us $599/month for a single device, we ended up picking two of such LBs from eBay and put them in a HA mode. Over the run of 18 months (so far) we've ended up saving a whole lot more. Granted we are not using the latest software/firmware as such.
F5 is good and pretty much seems to be the defacto choice. Everyone uses it and it is a cinch to configure.
Another good load-balancer is Foundry 400 - albeit slightly more expensive, the box is just pure rock-solid. I've personally not used Alteon - but have heard nothing but good things about them.
Usually you will need a "switch" after a load-balancer, unless your LB comes with a Switch module built-in (like the Foundry which has a 24 port switch module).