Discover the Power of Load Balancing in Distributed Systems: Enhance System Scalability

Madushan Ranasinghe
The Fresh Writes
Published in
5 min readJun 19, 2022

What is Load Balancing

In simple terms, Load Balancing is the process of distributing network traffic across multiple servers. So why we need load balancing? Let’s consider you build an application, and it has only few users. But as the time grows by, your application becomes popular. Your Application now has lots of traffic, and one instance is not going to work in the long run.

So What Should you do? You have to have a multiple instance of your application. But now you have a new problem. How would the client know which instance to communicate? Problematic right! So This is where Load Balancers Comes in to the picture. A Load Balancer ensures no single server bears too much demand. By spreading the work evenly, load balancing improves application responsiveness. Today, Load Balancers are one of the main component in a distributed system. In Modern Day, load balancer is used for

  • Distributing client requests or network load across multiple servers in an efficient manner,
  • Ensuring Reliability and availability of application through sending request only to those that are online.
  • Having additional features such as application security
How Load Balancer Works

Understanding Load Balancing Algorithms

When a request arrives from a user, the load balancer assigns the request to a given server, and this process repeats for each request. Load balancers determine which server should handle each request based on a number of different algorithms. A load balancing algorithm is the logic that used by a load balancer to distribute network traffic among servers. Load balancing algorithm use various factors such as server capacity, client requests, current connection time, and IP address.

  • Round Robin Method - Requests are distributed sequentially across the group of servers.
  • Hash - Requests are distributed based on a key you specify, such as the client IP address or the request URL.
  • IP Hash - IP address of the client determines which server receives the request.
  • Least Response Time Method - Traffic is routed to the server with the fewest active connections and the shortest average response time
  • Least Connection Method - Directs traffic to the server with the fewest active connections.

There are many benefits in Load balancer for modern web applications. It improves the efficiency, redundancy, scalability, availability of application and resources.

That’s it for this short session, next up we will see more on distributed systems.

Do support our publication by following it

--

--

Madushan Ranasinghe
The Fresh Writes

Engineering Undergraduate who loves to explore new technologies.