---
title: "What is a Load Balancer?"  
description: "What is a Load Balancer?"  
author: "ICSM Computer"  
published: 2026-01-15  
updated: 2026-01-15  
canonical: https://www.mindstick.com/interview/34443/what-is-a-load-balancer  
category: "website & mobile applications"  
tags: ["api(s)", "cloud", "application"]  
reading_time: 5 minutes  

---

# What is a Load Balancer?

A [**Load Balancer**](https://github.com/SocketCluster/loadbalancer) is a system (hardware or software) that **distributes incoming network traffic across multiple servers** to ensure **high availability, scalability, performance, and reliability** of an application

Instead of all users hitting one server, the load balancer decides **which server should handle each request**.

## Why Load Balancers Are Needed

## Without a load balancer:

- One server can get overloaded
- Application may become slow or crash
- Single point of failure exists

## With a load balancer:

- Traffic is evenly distributed
- Failed servers are automatically avoided
- Application remains fast and available

## Basic Architecture (Image / Diagram)

![What is a Load Balancer?](https://www.mindstick.com/interviewquestion/18843e8d-9e57-47b7-a8f6-fbd7a78eff65/images/f575583d-3a52-4ff1-969c-58fa0deeefed.png)

## Working Process of a Load Balancer (Step by Step)

### 1. Client Sends Request

A user opens a website or API:

```plaintext
https://example.com
```

The request first goes to the **Load Balancer**, not directly to a server.

### 2. Health Check

The load balancer continuously checks:

- Is Server A alive?
- Is Server B responding?
- Is Server C overloaded?

Unhealthy servers are **removed from rotation**.

### 3. Load Balancing Algorithm Selection

The load balancer chooses a server using an algorithm such as:

- Round Robin
- Least Connections
- IP Hash

### 4. Request Forwarding

The request is forwarded to the selected server.

```plaintext
Client → Load Balancer → Server B
```

### 5. Server Responds

The chosen server processes the request and sends the response back **through the load balancer** to the client.

## Request Flow Diagram (Working Process)

![What is a Load Balancer?](https://www.mindstick.com/interviewquestion/18843e8d-9e57-47b7-a8f6-fbd7a78eff65/images/93805bf4-b072-4699-90df-f19454c726fe.png)

## Common Load Balancing Algorithms

### 1. Round Robin

Requests are distributed sequentially.

```plaintext
Request 1 → Server A
Request 2 → Server B
Request 3 → Server C
```

Best for: servers with equal capacity.

### 2. Least Connections

Request goes to the server with **fewest active connections**.

Best for: long-running requests.

### 3. IP Hash

Same client IP always goes to the same server.

Best for: session-based applications.

## Types of Load Balancers

### 1. Hardware Load Balancer

- Physical device
- Very fast but expensive
- Used in enterprise data centers

### 2. Software Load Balancer

- Runs as software
- Flexible and cost-effective
- Examples:

   - NGINX
   - HAProxy
   - Traefik

### 3. Cloud Load Balancer

- Managed by cloud providers
- Auto-scaling and highly available
- Examples:

   - AWS ALB / NLB
   - Azure Load Balancer
   - Google Cloud Load Balancer

## Layer-wise Load Balancing

### Layer 4 (Transport Layer)

- Based on IP + Port
- Faster
- No content inspection

Example:

```plaintext
TCP traffic on port 443
```

## Real-World Example

### E-commerce Website Sale Day

Without Load Balancer:

```plaintext
Users → Single Server → Crash
```

With Load Balancer:

```plaintext
Users → Load Balancer → 10 Servers → Smooth experience
```

## Key Benefits Summary

- High availability
- Fault tolerance
- Scalability
- Better performance
- Zero-downtime maintenance

## Answers

### Answer by ICSM Computer

A [**Load Balancer**](https://github.com/SocketCluster/loadbalancer) is a system (hardware or software) that **distributes incoming network traffic across multiple servers** to ensure **high availability, scalability, performance, and reliability** of an application

Instead of all users hitting one server, the load balancer decides **which server should handle each request**.

## Why Load Balancers Are Needed

## Without a load balancer:

- One server can get overloaded
- Application may become slow or crash
- Single point of failure exists

## With a load balancer:

- Traffic is evenly distributed
- Failed servers are automatically avoided
- Application remains fast and available

## Basic Architecture (Image / Diagram)

![What is a Load Balancer?](https://www.mindstick.com/interviewquestion/18843e8d-9e57-47b7-a8f6-fbd7a78eff65/images/f575583d-3a52-4ff1-969c-58fa0deeefed.png)

## Working Process of a Load Balancer (Step by Step)

### 1. Client Sends Request

A user opens a website or API:

```plaintext
https://example.com
```

The request first goes to the **Load Balancer**, not directly to a server.

### 2. Health Check

The load balancer continuously checks:

- Is Server A alive?
- Is Server B responding?
- Is Server C overloaded?

Unhealthy servers are **removed from rotation**.

### 3. Load Balancing Algorithm Selection

The load balancer chooses a server using an algorithm such as:

- Round Robin
- Least Connections
- IP Hash

### 4. Request Forwarding

The request is forwarded to the selected server.

```plaintext
Client → Load Balancer → Server B
```

### 5. Server Responds

The chosen server processes the request and sends the response back **through the load balancer** to the client.

## Request Flow Diagram (Working Process)

![What is a Load Balancer?](https://www.mindstick.com/interviewquestion/18843e8d-9e57-47b7-a8f6-fbd7a78eff65/images/93805bf4-b072-4699-90df-f19454c726fe.png)

## Common Load Balancing Algorithms

### 1. Round Robin

Requests are distributed sequentially.

```plaintext
Request 1 → Server A
Request 2 → Server B
Request 3 → Server C
```

Best for: servers with equal capacity.

### 2. Least Connections

Request goes to the server with **fewest active connections**.

Best for: long-running requests.

### 3. IP Hash

Same client IP always goes to the same server.

Best for: session-based applications.

## Types of Load Balancers

### 1. Hardware Load Balancer

- Physical device
- Very fast but expensive
- Used in enterprise data centers

### 2. Software Load Balancer

- Runs as software
- Flexible and cost-effective
- Examples:

   - NGINX
   - HAProxy
   - Traefik

### 3. Cloud Load Balancer

- Managed by cloud providers
- Auto-scaling and highly available
- Examples:

   - AWS ALB / NLB
   - Azure Load Balancer
   - Google Cloud Load Balancer

## Layer-wise Load Balancing

### Layer 4 (Transport Layer)

- Based on IP + Port
- Faster
- No content inspection

Example:

```plaintext
TCP traffic on port 443
```

## Real-World Example

### E-commerce Website Sale Day

Without Load Balancer:

```plaintext
Users → Single Server → Crash
```

With Load Balancer:

```plaintext
Users → Load Balancer → 10 Servers → Smooth experience
```

## Key Benefits Summary

- High availability
- Fault tolerance
- Scalability
- Better performance
- Zero-downtime maintenance


---

Original Source: https://www.mindstick.com/interview/34443/what-is-a-load-balancer

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
