+

Search Tips  |   Advanced Search

Load Balancing

Networking

By: IBM Cloud Education

Share this page on LinkedIn

In this guide, learn how load balancing optimizes website and application performance.

Table of Contents

What is load balancing?

As strain increases on a website or business application, eventually, a single server cannot support the full workload. To meet demand, organizations spread the workload over multiple servers. Called "load balancing," this practice prevents a single server from becoming overworked, which could cause it to slow down, drop requests, and even crash.

Load balancing lets you evenly distribute network traffic to prevent failure caused by overloading a particular resource. This strategy improves the performance and availability of applications, websites, databases, and other computing resources. It also helps process user requests quickly and accurately.

From a user perspective, load balancing acts as an invisible facilitator that sits between a client and a group of servers, ensuring connection requests don't get lost. Without load balancing, applications, websites, databases, and online services would likely fail when demand gets too high. A single high-traffic website may field hundreds or thousands of user requests at the same time. It needs multiple servers to accurately populate webpages with the requested information, including text, photos, video, and audio streaming.

You will often find load balancing in use at server farms that run high-traffic websites; it is also used for Domain Name System (DNS) servers, databases, and File Transfer Protocol (FTP) sites. If a single server handles too much traffic, it could underperform or ultimately crash. By routing user requests evenly across a group of servers, load balancers minimize the likelihood of downtime. They do this by rerouting traffic to other servers in the group if one should fail. When adding a new server to the server pool, a load balancer automatically includes it in the process of traffic distribution.

Load balancing acts as a 'traffic cop,' bringing order to a potentially chaotic situation. In certain environments, such as applications and virtual infrastructures, load balancing also performs health checks to ensure availability and prevent issues that can cause downtime. Load balancing can even provide centralized security across the group of servers that is easier to manage.

Load balancing performs these critical tasks:

How it works

The load balancer uses a predetermined pattern, known as a load balancing algorithm or method. This ensures no one server has to handle more traffic than it can process. Different algorithms manage the process using different techniques. You, therefore, have multiple options to choose from when making a decision on what type of load balancer to use.

Here are the basics of how a load balancer works:

  1. A client, such as an application or browser, receives a request and tries to connect with a server.
  2. A load balancer receives the request,and, based on the preset patterns of the algorithm, it routes the request to one of the servers in a server group (or farm).
  3. The server receives the connection request and responds to the client via the load balancer.
  4. The load balancer receives the response and matches the IP of the client with that of the selected server. It then forwards the packet with the response.
  5. Where applicable, the load balancer handles SSL offload, which is the process of decrypting data using the Security Socket Layer encryption protocol, so that servers don't have to do it.
  6. The process repeats until the session is over.

Benefits

If your organization runs high-traffic websites and applications or databases that receive a lot of queries, load balancing delivers multiple benefits by optimizing resource use, data delivery, and response time. In high-traffic environments, load balancing is what makes user requests go smoothly and accurately. They spare users the frustration of wrangling with unresponsive applications and resources.

Load balancing also plays a key role in preventing downtime and simplifying security, reducing the likelihood of lost productivity and lost profits for your organization.

Other benefits of load balancing include the following: