Free Load Balancer

Kemp

Webmasters guide to HTTP Load Balancer and front end proxies

Load balancers are generally used to distribute and balance client traffic between servers. There are a range of terms for traffic distribution starting with the very basic functionality of a proxy (as a front end or reverse proxy) to the more sophisticated application level or smart load balancing as provided by a modern load balancer or Application Delivery Controller (ADC).

In this in-depth look at the options available to webmasters, we will consider the full range of functionality available:

  • Front End Proxy (basic)
  • Reverse Proxy
  • Load Balancer
  • Application request routing
  • Layer 2-4 load balancing
  • Layer 7 load balancing
  • Load balancing algorithms
  • ADC
There are a number of products and solutions available to users

  • KEMP Free LoadMaster
  • Apache RR
  • HAProxy
  • NGINX
  • Windows NLB (now defunct)
  • Microsoft IIS ARR (Application Request Routing)
The main architectural solutions the server administrator needs to consider are

  • Security
  • Performance
  • High Availability
  • Routing Architecture (algorithms)
  • Sharing workload between servers

Avoiding Server Dependencies

With IIS, Apache (mod_proxy) and Windows NLB – the load balancing and application routing is hosted on the actual application servers. Placing the load balancing function on the application servers is not a good idea as not only does it impact on server performance, it also does not provide the resilience necessary for transparent application failover in the event of a server failure. Ensuring resilience in the event of a server failure would require the deployment of some type of high-availability service on the application server which would consume additional server resources.

With NGINX, Apache (mod_proxy) and ARR on IIS, processing is handled locally on the application server and must be configured and maintained on each of these servers. The options for traffic distribution are limited and often only offer round robin load balancing. With no ability to perform out-of-band health checks, host based load balancers can’t intelligently and independently route traffic during an application or server problem, periods of high demand, an attack (for example DDOS) or if the server has become unresponsive.

Server independence moves heavier, repetitive tasks to a separate server, for example a hardware load balancer or virtualised machine which offers a single point of management and may be optimized to deliver much higher capacity. As application servers become busy, a dedicated load balancer with health checking can assess the capacity of servers and distribute traffic to the most capable servers. Health checking also provides failover capability as the load balancer forwards traffic away from problem servers.

Layer 7 and HTTP Acceleration

An ADC load balancer is made up of a suite of software tools working in concert. They can be deployed as dedicated devices with the software preinstalled, on to existing server hardware, or as a virtual server on VMware vSphere, Microsoft Hyper-V, Amazon Web Services, Microsoft Azure, or other cloud services. Think of the ADC load balancer as a complex system of network optimisation tools that include:

  • A web server component
  • A number of traffic and routing optimisation algorithms
  • Image caching (reducing web server load)
  • Content caching
  • Compression
  • Content Switching and Rewriting
  • SSL Encryption/Decryption (further load reducing)
  • Single Sign On (preventing users having to login when being switched between servers)
  • GEO and DNS failover
  • Cookie Persistence

Some solutions require the integration of multiple components to deliver a fully featured solution for Application layer 7 and HTTP acceleration. Not only is this time consuming, it can also be risky as flaws are introduced during integration leading to instability and leaving services with vulnerabilities. Using a fully integrated solution removes the pain of integration and the use of a tried and tested removes risk.

Load Balancing Algorithms

Not all applications have the same properties when deployed across multiple servers and load balancers need to support a wide range of load balancing algorithms to support the varying application requirements.

Round Robin

This method tells the LoadMaster to direct requests to Real Servers in a round robin order.

Weighted round robin

This method allows each server to be assigned a weight to adjust the round robin order. E.g. “Server 1” can get 2 times the request that “Server 2” gets.

Least connection

This method tells the LoadMaster to look at the connections going to each server and send the next connection to the server with the least amount of connections.

Weighted least connection

This method allows each server to be assigned a weight to adjust the least connection order. E.g. “Server 1” can get 2 times the connections that “Server 2” gets.

Agent-Based Adaptive Balancing

This method is resource based load balancing where an agent gets installed on the server and monitors the servers resources (e.g. RAM, CPU…) and then reports back a percentage to the LoadMaster which is used for load balancing.

Fixed weighting

This method is used for Redundancy rather than Load Balancing, all connections will go to the server with the highest weight in the event this server fails then the server with the next highest weight takes over.

Weighted response time

This method looks at the response times of the real servers (based on the response time of the server health check) and which every real server is responding fastest gets the next request.

Source IP hash

This method looks at the source IP address that sent the request to the LoadMaster and will create a HASH value for it and if the HASH value is different then it gets sent to a different Real Server.

Application Delivery, Performance and Scalability matrix

Platforms KEMP Free HAProxy NGINX (Open Source) Apache (mod_proxy) IIS with ARR Varnish
Feature
Reverse Proxy
Compression
Caching
Advanced HTTP Load Balancing
SSL Offload
Server Health Check
Integrated Security
Web Application Firewall
IPS
IDS
Custom SSO Forms
Implementation and Solution Delivery
Integrated Virtual Appliance
Live Activity Monitoring
Java API
Full RESTful API
Global Server Load Balancing