Introduction
Over the years I’ve been asked to produce a number of high reliability high throughout web hosting solutions. Although there are a number of off the shelf solutions that are expensive, the true high availability solutions can be realised using standard linux builds.
In the following article I’ll outline aids to help you build low cost HA solutions using linux.
Load Balancing
For high throughput application it is often not possible to host on a single server. In addition the availability of a single host cannot be guaranteed, so a multi hosted solution is often better.
Developing web applications that can run on multiple servers poses a number of problems, mainly around state maintenance and session management, but these will be covered elsewhere.
Commercial Load Balancers
Commercial hardware load balancers offer a range of features, but you must always consider the “Single Point of Failure” problem, even if the load balancer has dual power supplies etc it can fail, or require replacement. It is always better to buy two complete units that can work in parallel offering higher availability. Upgrading a single unit can be done without fear of loss off service.
By using an external pair of round robin DNS entries it is possible to spread the load across balancers. In the event of a balancer failing you can move the failed IP address to the remaining balancer.
Commercial load balancers are expensive!.
Linux Load Balancers
Using two linux servers and a high availability heartbeat configuration provides a far cheaper solution had has been used by Bigmite Hosting Solutions. Using two linux servers in a HA configuration and running suitable load balancing software a high throughput can be achieved.
A small server can saturate a 1Gb/s network link, leaving the back end application servers to do the work. The choice of load balancing software depends on your requireements such as:-
- Session Management
- Keep Alives
- Monitoring
- Latency
If no session management is required (such as a static site) then the kernel based ipvs (Linux Virtual Server) can be used, this is part of the standard linux distribution, and is simple to configure and very reliable.
If sessions need to be maintained to a client then layer x based load balancing is required. Packages such as HAProxy and BalanceNG (which is next generation of the balance software) offer these features.
Heartbeat
Heatbeat (www.linuxha.org
Requests for comments……
It is NOT finished…. it’s just ready for comments…. I’ve two busy to complete – please comment, and I’ll add your comments…..