What Is Load Balancing And How Does It Work?

20th November, 2018 by

As its name suggests, load balancing is a method of distributing tasks evenly across a series of computing resources. Designed to prevent one device from being overloaded while another stands idle, it’s been used in computing for decades in the form of either dedicated hardware or software algorithms. As cloud hosting and SaaS have grown in popularity, it’s been adopted for handling network traffic, database queries and SSL requests.

Imagine that 100TB has three servers dedicated to servicing the same high-volume client. Now imagine that nine users simultaneously request data from that client’s website or online resources. A human would regard it as logical to divide these requests evenly between the servers. However, it might not be logical to the computer hardware. Without load balancing tools, all nine requests may end up being serviced by the same server. That would place a heavy processing burden on this device, while spare capacity stood idle nearby.

How load balancing works

In essence, processing tasks are divided according to a scheduling algorithm. This is designed to maximize speed, ensuring that any capacity is fully utilized. It may involve a round-robin distribution, where servers are allocated requests in a fixed sequence. Alternatively, new requests might be sent to the server with the lowest number of active connections, the least CPU usage, the smallest queue time or the lowest volume of lost data packets.

A more sophisticated version of a load balancing algorithm involves IP hash, where traffic is directed to a particular server according to the client’s IP address. This is useful for companies with a global footprint, such as online gaming portals. As an example, 100TB’s global data center network includes servers in Sao Paolo and Salt Lake City. It’s obvious to people which servers two gamers in Utah and Brazil should be connected to in order to minimize latency and packet loss, but computers wouldn’t automatically grasp this without being instructed. Equally, an ecommerce transaction where product data and checkout functionality are hosted on separate servers may cause instability, as requests are handed from one server to the other. Load balancing can support session persistence, reducing inefficiencies and streamlining the user experience.

The benefits of load balancing

  • Sudden spikes in demand will be spread evenly across available resources, minimizing access times and reducing the likelihood of a server failing over.
  • Even if a server goes offline or develops a fault, traffic is automatically routed to other resources to share its duties until that server can be restored to active service.
  • Conversely, a newly added server will immediately begin receiving traffic, alleviating pressure on its counterparts to deliver the fastest possible response times.
  • A single visit or transaction can be completed on one server, even if it would normally be handled by separate servers. This ensures continuity of service for individual users.
  • From a customer’s perspective, maintenance, software updates, and repairs have no discernible effect on a resource’s availability or operating efficiency.