i Load balancing 101 – All things in moderation

Load balancing 101

What is load balancing ?

Load balancing refers to efficiently distributing incoming network traffic across a group of backend servers, also known as a server farm or server pool.
Load balancing aims to optimize resource use, maximize throughput, minimize response time, and avoid overload of any single resource. Using multiple components with load balancing instead of a single component may increase reliability and availability through redundancy.
Load balancing can be implemented with hardware, software, or a combination of both.

Load balancing is the most straightforward method of scaling out an application server infrastructure. As application demand increases, new servers can be easily added to the resource pool, and the load balancer will immediately begin sending traffic to the new server. Core load balancing capabilities include:

  • Layer 4 (L4) load balancing – the ability to direct traffic based on data from network and** transport layer protocols**, such as IP address and TCP port
  • Layer 7 (L7) load balancing and content switching – the ability to make routing decisions based on application layer data and attributes, such as HTTP header, uniform resource identifier, SSL session ID and HTML form data

Why are load balancers needed ?

Traffic volumes are increasing and applications are becoming more complex. Load balancers provide the bedrock for building flexible networks that meet evolving demands by improving performance and security for many types of traffic and services, including applications.

How do load balaners work ?

The load balancing virtual server can use any of a number of algorithms (or methods) to determine how to distribute load among the load-balanced servers that it manages.This picture below is a high level architecture of load balancing.

On a high level, threre are two defintion we can devide about load balancer
* Layer:
_1. Trasport-level load balancing ( layer 4)
  * DNS-based load balacing
  * TCP/IP server load balancing
  * Caching
_2. Application-level load balancing( layer 7)
* Hardware/Software
_1. Software Load Balancer Examples
  * NGINX – A http load balancer with SSL termination support.
  * LVS – Linux virtual server offering layer 4 load balancing
  * Varnish-A reverse proxy based load balancer
_2. Hardware Load Balancer Examples
  * F5
  * CISCO system catalyst
  * Citrix

Load balancing algorithms and methods

Load balancing uses various algorithms, called load balancing methods, to define the criteria that the load balancing virtual server uses to select the service to which to redirect each client request. Different load balancing algorithms use different criteria.
* The Least Connection Method
The default method, when a virtual server is configured to use the least connection, it selects the service with the fewest active connections.
* The Round Robin Method
This method continuously rotates a list of services that are attached to it. When the virtual server receives a request, it assigns the connection to the first service in the list, and then moves that service to the bottom of the list.

* The Least Response Time Method
This method selects the service with the fewest active connections and the lowest average response time.
* The Least Bandwidth Method
This method selects the service that is currently serving the least amount of traffic, measured in megabits per second (Mbps).
* The Least Packets Method
This method selects the service that has received the fewest packets over a specified period of time.
* The Custom Load Method
When using this method, the load balancing appliance chooses a service that is not handling any active transactions. If all of the services in the load balancing setup are handling active transactions, the appliance selects the service with the smallest load.


That’s some introduce load balancing, I’ll upate this post , let write your comment what things you not clear !



Leave a Reply