Getting started with Computing

Mastering ELB: Types & Algorithms

Learning Outcome

5

Understand Round Robin algorithm

4

Differentiate between ALB, NLB, and CLB

3

Identify main components of ELB

2

Understand why ELB is needed

1

Explain what load balancing is

Earlier, we learned that

Elastic Load Balancing (ELB)

Elastic Load Balancing (ELB) is an AWS service that automatically distributes incoming application traffic across multiple targets to maintain high availability and scalability

Key Points

Routes traffic to EC2 instances, Lambda functions, and IP addresses

Automatically detects unhealthy servers and removes them from routing

Sends traffic only to healthy (working) servers

Improves availability, scalability, and fault tolerance

Why ELB is Important?

Elastic Load Balancer (ELB) receives incoming user traffic and forwards it to the correct backend service

These backend targets can be

EC2 instances

virtual servers running applications

Lambda functions

serverless code execution

IP addresses 

on-premise servers or other services

Simple example

When users open a website

The ELB

Receives the request

Decides where to send it

Routing

How ELB Works

User opens a website

Request goes to Load Balancer

Load Balancer checks server health

Request is forwarded to a healthy server

Response is sent back to user

Types of Load Balancers

Why  multiple types exist?

  • Different applications need different handling

AWS provides options based on

Speed

Traffic type

Application layer

Application layer

Works at application level

Understands

  • URLs
  • Headers

  • Cookies

Used for

Web apps

Microservice

Network Load Balancer (NLB)

  • Works at network level
     

  • Handles sudden traffic spikes

Used for

Financial systems

Gaming platforms

Gateway Load Balancer (GWLB)

  • Used to deploy, scale, and manage third-party security appliances like firewalls and IDS/IPS.
  • Operates at Layer 3 of the network.
  • Forwards traffic transparently without changing IP addresses.

Example

A company routes all traffic through a Gateway Load Balancer, which distributes it across multiple firewalls for security, scaling, and high availability.

Classic Load Balancer (CLB)

  • Classic Load Balancer (CLB) is a legacy AWS load balancer that operates at Layer 4 and Layer 7.
  • It distributes traffic across multiple EC2 instances to improve availability and reliability.

Example

A legacy web app uses CLB to balance HTTP traffic, so if one instance fails, the app remains available

“BUT NOWDAYS THE USE OF THE CLASSIC LOADBALANCER ARE VERY RARE OR NOT IN USE ”

Round Robin Algorithm

Round Robin Algorithm distributes requests sequentially in a circular order so each server gets equal traffic.

  • Requests are sent in circular order
  • Every server gets equal opportunity
  • Very simple and fair
  • Does not check server load before routing
  • Works best when all servers have similar capacity
  • Commonly used in basic load balancing
  • insures even traffic distribution across servers

Summary

3

Round Robin ensures fairness

2

ALB, NLB, CLB serve different needs

1

ELB distributes traffic intelligently

Quiz

What does the Round Robin algorithm do?

A. Sends requests one by one to each server in order

B. Sends requests random

C. Blocks extra user requests

D. Sends all requests to one server

Quiz-Answer

What does the Round Robin algorithm do?

A. Sends requests one by one to each server in order

B. Sends requests random

C. Blocks extra user requests

D. Sends all requests to one server

Mastering ELB: Types & Algorithms

By Content ITV

Mastering ELB: Types & Algorithms

  • 63