Load balancing is a technology used in the dedicated hosting arena to spread work across a number of servers with the goal of increasing capacity, speeding up response times and avoiding downtime.
As opposed to the traditional route of pointing traffic directly at a server’s IP, network traffic is directed to an IP on the load balancer. It is the responsibility of the load balancer to choose which server to forward this request to. There are 2 factors which help the load balancer make this choice:
Server health checks ensure servers in a solution respond to requests sent to them. There are several methods used by load balancers to assess the health of the servers in a solution, including:
Assuming all servers are “healthy”, the load balancing strategy defines the decision making parameters. Typical strategies include:
The use of persistence and SSL offloading are common when load balancing dedicated servers as they allow more control in the solution.
Persistence, or “stickiness”, directs users back to the original server they visited with the purpose of serving stored information, such as the contents of a shopping basket or previously selected settings, again. When using persistence, be aware of the pitfalls as well as the advantages. For example, using IP based persistence often results in the user being directed back to a down server despite healthy servers being available.
Cookie based persistence (used in Layer 7 solutions) is a smarter choice and directs users to an available server when the preferred choice is unavailable.
“SSL offloading” (or acceleration) allows data travelling from user to hosted solution to be encrypted by the load balancer and not the server. Data encryption is server intensive, often affecting the capacity of the server. By offloading this role to the load balancer, data encryption will not affect the server’s ability to perform other tasks.
To ensure we make the most of the benefits of load balancing, servers within the solution must be physically separated and the degree to which you are able to do this determines how bullet proof your solution is:
Layer 4 vs Layer 7 load balancing
The following features are consistent across both platforms
Methods – Round Robin, Weighted
Health Checking – TCP Connect
Persistence – IP Based
Other features – Multi racks / suites
There are some features however that are exclusive to Layer 7 load balancing
Methods – Least Connections, URL Parsing, HTTP Headers
Health checking – Ping, Simple HTTP GET
Persistence – Cookie Based
Other features – Multiple data centres, SSL offloading