Load Balancer and Types

1. Understanding Load Balancing

1.1: What is Load Balancing?

In the context of parallel computing, Load Balancing is the distribution of a set of tasks over different computing units (or related resources), to make the overall process easier to execute and much more efficient. Ensuring no single server bears too much of demand and evenly spreading the load, it improves the responsiveness and availability of applications or websites for the user.

  1. Understanding Load Balancing
  2. About Load Balancers
  3. Load Balancing Methods
  4. Benefits of Load Balancers

1.2: The Problem Statement

Modern applications and websites cannot function without balancing the load on them. This is for the reason that such applications and sites serve millions of simultaneous requests from the end-users and have returned the correct text and images or the related data asked for, responsively, and reliably. Adding more servers was considered to be good practice for meeting such high volumes of traffic, so far.

But, the concept of balancing the load with a dedicated Load Balancer unit is a much more economical and effective way of ensuring the peak performance of the website or application and offering the end-user a great experience.

1.3: History of Load Balancing

The load balancing concept was initiated in 1990 with special hardware that was deployed to distribute traffic across a network. With the development of Application Delivery Controllers (ADCs), load balancing became a better-secured convenience, offering uninterrupted access to applications even at peak times.

ADCs are categorized as Hardware Appliance, Virtual Appliance, and Software Native Load Balancers. In this era of cloud computing, the software-based ADCs are used to perform tasks as the hardware counterpart performs but with better scalability, functionality, and flexibility.

Automate Your F5 ADCs to Get Rid of Service Delivery Delays and TCO Surge

2. About Load Balancers

2.1 What is a Load balancer?

A load balancer distributes network or application traffic across a number of servers. Load balancers are used to increase the capacity and reliability of applications. Session management can improve the performance of your web applications. It can also provide increased scalability, security, and improved end-user experience.

what is a load balancer
Layer-4 load balancers are generally grouped into two categories: Layer 4 and 7. Load balancers are designed to perform one or more functions, such as distribution, routing, security, and accounting for distributed systems. A layer 7 (L7. The load balancer distributes requests based on the data found in application layer protocols like HTTP.
Load balancers are designed to both receive requests and distribute them to the appropriate servers. They can do this using different algorithms that are based on the different types of load-balancing scenarios. Some of the best and most accurate algorithms for calculating the number of items in a shopping cart are:

  • Round robin
  • Weighted round-robin
  • Least connections
  • Least response time

Layer 7 load balancers can further distribute requests based on application-specific data such as HTTP headers, cookies, or data within the application message itself, such as the value of a specific parameter.
Load balancers ensure reliability and availability by monitoring the “health” of applications and only sending requests to servers and applications that can respond in a timely manner.

2.2 Understanding the functions of load balancers

In general, a Load Balancer acts as a ‘traffic controller’ for your server and directs the requests to an available one, capable of fulfilling the request efficiently. This ensures that requests are responded to fast and no server is over-stressed to degrade the performance.

In an organization’s attempt to meet the application demands, Load Balancer assists in deciding which server can efficiently handle the requests. This creates a better user experience.

By helping servers move data efficiently, information flow between the server and endpoint device is also managed by the load balancer. It also assesses the request-handling health of the server, and if necessary, Load Balancer removes the unhealthy server until it is restored.
As the servers can also be physical or virtual, a load balancer can also be a hardware appliance or a software-based virtual one. When a server goes down, the requests are directed to the remaining servers and when a new server gets added, the requests automatically start getting transferred to it.


2.3 How do load balancers work?

A load balancer may be:

  • A physical device, a virtualized instance running on specialized hardware, or a software process.
  • Application delivery controllers, which are incorporated into ADCs, are designed to improve the performance and security of applications, no matter where they are hosted.
  • Able to handle many possible algorithms for balancing the load on your server farm, including round-robin, server response time, and the least connection method.

Load balancers detect the health of backend resources and only send traffic to servers that are not able to satisfy requests. Whether it’s hardware or software, or which algorithm(s) it uses, a load balancer distributes traffic to different web servers. In other words, it balances loads across different servers, ensuring that no one server becomes overloaded and, thereby, unreliable.

The most efficient load-balancing algorithm is for cloud-based eCommerce websites. A load balancer is also sometimes likened to a traffic cop because its job is to route requests to the right location at any time, preventing costly bottlenecks and unforeseen incidents.

Load balancers should ultimately deliver the performance and security necessary for sustaining complex IT environments and their intricate workflows. Load balancing is the most scalable approach for supporting the numerous web-based services that are used in today’s multi-device, multi-app workflows. In tandem with platforms that enable seamless access to the numerous applications and desktops within today’s digital workspaces, load balancing supports a more consistent and dependable end-user experience for employees.

2.4 Types of Load Balancers – Based on Functions

Several load balancing techniques are there for addressing the specific network issues:

a.) Network Load Balancer / Layer 4 (L4) Load Balancer:
Based on the network variables like IP address and destination ports, Network Load balancing is the distribution of traffic at the transport level through the routing decisions. Such load balancing is TCP i.e. level 4, and does not consider any parameter at the application level like the type of content, cookie data, headers, locations, application behavior etc. Performing network addressing translations without inspecting the content of discrete packets, Network Load Balancing cares only about the network layer information and directs the traffic on this basis only.

b.) Application Load Balancer / Layer 7 (L7) Load Balancer:
Ranking highest in the OSI model, Layer 7 load balancer distributes the requests based on multiple parameters at the application level. A much wider range of data is evaluated by the L7 load balancer including the HTTP headers and SSL sessions and distributes the server load based on the decision arising from a combination of several variables. This way application load balancers control the server traffic based on the individual usage and behavior.

c.) Global Server Load Balancer/Multi-site Load Balancer:
With the increasing number of applications being hosted in cloud data centers, located at varied geographies, the GSLB extends the capabilities of general L4 and L7 across various data centers facilitating the efficient global load distribution, without degrading the experience for end users. In addition to the efficient traffic balancing, multi-site load balancers also help in quick recovery and seamless business operations, in case of server disaster or disaster at any data center, as other data centers at any part of the world can be used for business continuity.

What is Application Load Balancing?

Load balancing is a common networking term that refers to distributing the workload across multiple servers and other network resources at the application layer of the OSI network model. Typically, this involves load balancing at web application protocol level (HTTP/HTTPS, FTP, SMTP, DNS, SSH, etc.), for network health checking, server monitoring, network traffic optimization, minification, and caching.
Application Load Balancing

2.5: Types of Load Balancers – Based on Configurations

Load Balancers are also classified as:

a.) Hardware Load Balancers:
As the name suggests, this is a physical, on-premise, hardware equipment to distribute the traffic on various servers. Though they are capable of handling a huge volume of traffic but are limited in terms of flexibility, and are also fairly high in prices.

b.) Software Load Balancers:
They are the computer applications that need to be installed in the system and function similarly to the hardware load balancers. They are of two kinds- Commercial and Open Source and are a cost-effective alternative to the hardware counterparts.

software load balancers

c.) Virtual Load Balancers:
This load balancer is different from both the software and hardware load balancers as it is the combination of the program of a hardware load balancer working on a virtual machine.

Through virtualization, this kind of load balancer imitates the software driven infrastructure. The program application of hardware equipment is executed on a virtual machine to get the traffic redirected accordingly. But such load balancers have similar challenges as of the physical on-premise balancers viz. lack of central management, lesser scalability and much limited automation.

2.6: L4, L7, and GSLB load balancers, explained

Digital workers have many opportunities to create meaningful and impactful experiences for their customers or clients.

Their productivity fluctuates in response to everything from the security measures they place on their accounts to the varying performance of the many applications they use. They also suffer from problems related to poor responsiveness due to inadequate load balancing. In other words, digital workspaces are heavily application-driven. As the demand for software-as-a-service (SaaS) applications increases, managing them becomes increasingly complex. Without proper load balancing in place to deliver SaaS applications to end users reliably, problems can arise.

Employees who already have to deal with multiple systems, interfaces, and security requirements will bear the additional burden of performance slowdowns and outages. In order to keep up with evolving user demand, server resources need to be readily available. The server should be load balanced at layers 4 and 7.
Open Systems Interconnection (OSI) model:

  • Layer 4 (L4. load balancers work at the transport level. It means they can make routing decisions based on the TCP or UDP ports that packets use along with their source and destination IP addresses. L4 load balancers perform network address translation (NAT), but don’t look at each packet’s contents.
  • Layer 7 (L7) load balancers act at the application level, the highest in the OSI model. When deciding how to distribute requests across the server farm, they can evaluate a wider range of data than L4 counterparts, including HTTP headers and SSL session IDs.

The best load balancing is balancing the load between multiple servers, whether web servers, API servers, etc. Doing so is more computationally intensive at L7 than at L4, but it can be more efficient at L7 due to the added context in understanding and processing client requests to servers. In addition to primary L4 and L7 load balancing, GSLB extends the capabilities of either type across multiple data centers so that large volumes of traffic can be efficiently distributed without degradation of service for the end user.

Many cloud application hosting services are hosted in multiple data centers in various geographic locations. This approach delivers applications with excellent reliability and lower latency to any device or location. A consistent experience is an important consideration when planning a digital workspace strategy, particularly for those who have to deal with various client devices and devices.

2.7: Why is load balancing necessary?

Load balancers help IT departments ensure scalability and availability of services. This advanced traffic management feature can help your business steer requests more efficiently to the right resources for each end-user. In addition, ADC offers additional functions (like encryption, authentication, and web application firewalling) than other security tools.

2.8: What is Multi-Cloud Load Balancing?

A Multi-Location Load Balancer (MLB) is a web server load balancer that distributes incoming traffic across a pool of endpoints that reside in multiple environments/locations.
Multi-cloud load balancing refers to an advanced form of load balancing where the workload is spread out across multiple cloud environments.

There’s no longer a single public cloud deployment. And it’s now critical to monitor, audit, and distribute traffic to different destinations without any manual intervention. Cloud load balancing operates at either the Transport Layer or the Application Layer of the OSI networking model. In addition to these criteria, there are other ways to split the traffic across multiple cloud end-points, like turn-based, weighted or persistent routing, to name a few. The multi-cloud load balancer ensures that the clients get routed to the most desirable backend servers. Health monitors ensure that the traffic is only sent to healthy backend servers and cloud providers by taking the faulty server out of the load balancing pool.

Multi-cloud load balancers have many benefits over traditional on-premises hardware devices. The global nature of cloud appliances, the ease of deploying a software-based cloud load balancer, and the ability to scale and manage load in a single cloud appliance make demand scalability and flexible control possible across a wide variety of hosting solutions. In addition, it ensures redundancy because it runs in numerous geographic locations.

It is essential to monitor, audit, and distribute traffic to different geolocation end-points, with or without any manual interference. Therefore, DNS (Domain Name System) load balancing is implemented at the DNS level. DNS requests are handled dynamically by the load balancer to direct clients to the geographical servers or load balancing end-points that best fit their requirements.

This reduces the connection time to the web server, improving user experience and interactivity while also decreasing the web server’s load. In addition, there are many ways for companies to preserve business continuity, especially when there’s a sudden server failure or service disruption.

Load balancing redirects traffic to the nearest server not affected by the loss. Traffic distribution is achieved through various predefined policies, like turn-based, weighted or persistent routing, to name a few. Health monitors ensure that the traffic is only sent to healthy backend servers. They’re also known as failover controllers.

Appviewx product that automates load balancers of F5, Nginx, Citrix etc.,: ADC+

3. Load Balancing Methods

All kinds of Load Balancers receive the balancing requests, which are processed in accordance with a pre-configured algorithm.

3.1: Industry Standard Algorithms

The most common load balancing methodologies include:

a) Round Robin Algorithm:
It relies on a rotation system to sort the traffic when working with servers of equal value. The request is transferred to the first available server and then that server is placed at the bottom of the line.

b) Weighted Round Robin Algorithm:
This algorithm is deployed to balance loads of different servers with different characteristics.

c) Least Connections Algorithm:
In this algorithm, traffic is directed to the server having the least traffic. This helps maintain the optimized performance, especially at peak hours by maintaining a uniform load at all the servers.

d) Least Response Time Algorithm:
This algorithm, like the least connection one, directs traffic to the server with a lower number of active connections and also considers the server having the least response time as its top priority.

e) IP Hash Algorithm:
A fairly simple balancing technique assigns the client’s IP address to a fixed server for optimal performance.
What are some of the common load-balancing algorithms?
Load balancing happens when the algorithm used by the load balancer determines how to distribute traffic across multiple servers, such as a server farm. Here are many ways, ranging from simple to complex.

Round robin

Round-robin is a simple technique for guaranteeing that every user gets a different server. Load balancers are simple but don’t account for the loads already on the server. As a result, there is a danger that a server may become very busy and become overloaded. This might slow down the server, and this may cause problems for customers or clients.

Least response time method
A more sophisticated version of the slightest connection method, the least response time method relies on the time taken by a server to respond to a health monitoring request. The response time indicates how loaded the server is and how well the users receive your site or service. Some load balancers can also consider the number of active connections on each server.

Least connection method
Whereas round-robin doesn’t account for the current load on a server, the least connection method does make this evaluation, and as a result, it often delivers better performance. A virtual server following the least connection method will look to send requests to the server with the least number of active connections.

Least bandwidth method
A relatively simple algorithm, the least bandwidth method looks for the server currently serving the minor traffic as measured in megabits per second (Mbps). For example, in TCP, the least-recently-used method selects the server that has been connected to the least number of times over a given time.

Hashing methods
Methods in this category make decisions based on various data from the incoming packet. This includes connection or header information, such as source/destination IP address, port number, URL, or domain name.
Hashing Methods
Custom load method
The custom load method lets the load balancer query the load on individual servers via SNMP. An administrator can define which servers need to be queried and how to combine those server loads into a metric that reflects the user experience.

3.2: Other Specific Algorithm

a) Least Bandwidth Algorithm: In this method, the traffic is measured in Mbps, and the client request is sent to the server with the least Mbps of traffic.

b) Resource-Based (Adaptive) Algorithm: In this method, a computer program is installed in a server that reports the current load to the balancer. That agent program then assesses the servers and resource availability to direct the traffic at the best-suited server at the moment.

c) Resource-Based (SDN Adaptive) Algorithm: In this method, comprehensive knowledge from all layers of the application and inputs from an SDN Controller is analyzed to make better decisions regarding traffic distribution.

d) Source IP Hash: In this method, the client’s and server’s IP addresses are mixed to generate a unique hash key, which then allocates the traffic to a particular server.

e) URL Hash: This algorithm distributes writes uniformly across multiple sites direct all reads to the website owning a particular object.

4. Benefits of Load Balancers

Redirecting the traffic at the most functional server of the moment delivers the following advantage:

4.1: Benefits to the website/application:

1. Enhanced Performance:
Load Balancers reduce the additional load on a particular server and ensures seamless operations and response, giving the clients a better experience.

2. Resilience:
The failed and under-performing components can be substituted immediately and giving information about which equipment needs service, with nil or negligible downtime.

3. Security:
Without any change in any form, Load Balancer gives an additional layer of security to your website and applications.

4.2: Benefits to the organizations

1. Scalability:
Without disrupting the services, Load Balancers make it easy to change the server infrastructure anytime.

2. Predictive Analysis:
Software load balancers can predict traffic bottlenecks before they happen in reality.

3. Big Data:
Actionable insights out of the big data generated by global users can be analyzed to drive better and informed business decisions.