This is the first article in the series: Fundamental Concepts in System Design.

The Problem

Suppose you decided to make a web application based on your million dollar idea. You managed to get a server to host your web application. Fortunately, the application started gaining a lot of popularity and attracted a lot of users.

Role of a load balancer

  1. between the web server and the backend application server
  2. between the backend application server and the database server

Why load unbalancing occur?

The key concept here is that all requests coming from the users can’t be processed by a single server. The requests need to be routed to multiple servers to have a scalable system.

Load Balancing algorithms

The task of a load balancer is highly complicated. There are a lot of algorithms that have been developed which enables the load balancer to figure out the optimal mapping between the nodes and the tasks. Nevertheless, all load balancing algorithms try to optimize factors such as response time, execution time, execution cost, throughput, fault tolerance, task migration time, resource utilization, power, and energy consumption.

Load Balancer Cluster

Even though a load balancer can turn out to be one of the heroes in a scalable system, we need to make sure that it does not become a single point of failure. To solve this, we can have multiple load balancers to form a cluster. Each load balancer would then be conducting health checks on others and if one of them fails, the others would then take up its place to ensure complete availability.

Co-Founder & CTO at Hire the Author. Want to have a 1–1 with me? Reach out to me at