0% found this document useful (0 votes)
13 views3 pages

Basic Idea

A load balancer is a tool that distributes incoming network traffic across multiple servers to prevent overload and maintain performance and reliability. It can be hardware or software-based and uses various algorithms like Round Robin and Least Connections to manage traffic. Load balancers come in two types: Layer 4, which routes based on IP and port, and Layer 7, which understands HTTP/HTTPS and can route based on content.

Uploaded by

math48647
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views3 pages

Basic Idea

A load balancer is a tool that distributes incoming network traffic across multiple servers to prevent overload and maintain performance and reliability. It can be hardware or software-based and uses various algorithms like Round Robin and Least Connections to manage traffic. Load balancers come in two types: Layer 4, which routes based on IP and port, and Layer 7, which understands HTTP/HTTPS and can route based on content.

Uploaded by

math48647
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

A load balancer is a tool—either hardware or software—that distributes

incoming network traffic across multiple servers. It’s used to ensure no


single server gets overwhelmed and to keep websites and apps fast,
stable, and reliable.

🧭 Basic Idea
Think of it like a traffic cop at an intersection, directing cars (data requests)
to different roads (servers) to prevent jams (overload).

🧱 What It Does
 Distributes traffic evenly across multiple backend servers
 Increases reliability — if one server fails, traffic goes to another
 Improves performance — faster response by using the least busy
server
 Scales applications — lets you add/remove servers without
downtime

⚙️Common Load Balancing Algorithms


Algorithm How It Works
Round Robin Sends traffic to each server in turn
Chooses the server with the fewest active
Least Connections
connections
Routes requests based on the client’s IP
IP Hash
address
Weighted Round
Prefers more powerful servers more often
Robin
📦 Types of Load Balancers
1. Layer 4 (Transport Layer)

 Routes traffic based on IP address and port


 Fast and efficient
 Examples: HAProxy (L4), AWS ELB (TCP)

2. Layer 7 (Application Layer)

 Smarter — understands HTTP/HTTPS, cookies, and more


 Can route based on URLs, headers, or content
 Examples: NGINX, AWS ALB, Traefik

☁️Cloud-Based Examples
 AWS Elastic Load Balancer (ELB)
 Google Cloud Load Balancer
 Azure Load Balancer
 Cloudflare Load Balancing

📈 Why Use a Load Balancer?


Benefit Description
High
If one server fails, others take over
availability
Scalability Easily add/remove servers as needed
Performance Reduces server response time
Can hide real server IPs and prevent
Security
direct attacks

🧪 Simple Use Case Example


Let’s say you run an online store with 3 web servers:
1. A user opens your website
2. The load balancer picks one of the 3 servers (e.g. using round robin)
3. That server handles the request and sends back the page
4. If one server crashes, the load balancer sends future users to the
remaining 2

If you want, I can show you:

 How to set up a basic NGINX load balancer


 Compare AWS vs. GCP load balancers
 Use load balancing with containers (Docker/Kubernetes)

What are you working on?

You might also like