DEV Community

Saloni Singh
Saloni Singh

Posted on

Learning AWS Day by Day — Day 10 — Introduction to Load Balancers

Exploring AWS !!

Day 10:

Introduction to Load Balancers:

Load Balancer is a service that uniformly distributes network traffic & workloads across multiple servers or clusters. Load Balancers increase availability and fault tolerance.

Elastic Load Balancer:

  • load balancing service for AWS deployments.
  • ELB scales itself as necessary to handle load.
  • traffic is distributed in multiple AZ.
  • single point of contact for clients.

Types:

Classic Load Balancer — like traditional load balancing, but virtual devices replace physical hardware.
Network Load Balancer — used for handling sudden and violent site traffic.
Application Load Balancer — identifies specific incoming traffic and directs it to specific resource.
Gateway Load Balancer — used to ensure high availability by routing traffic flows through healthy virtual appliances, and re-routing in case of unhealthy appliances.

Blue/Green Deployments with Weighted Routes:
with weighted routing we can switch traffic between the versions of our application. This configuration allows us to control distribution of traffic to our application.
Example: If we define a rule having two target groups with weights 8 and 2, load balancer will route 80% traffic to first target group and 20% to another target group.

Classic Load Balancer:

  • distributes the incoming application traffic across EC2 instance in multiple AZs and functions at layer 7 of OSI model.
  • routes traffic to healthy instances only, and it is evenly distributed over.
  • Internet and internal facing load balancer.

Network Load Balancer:

  • functions at 4th layer of OSI model, flow hash algorithm.
  • handles millions of requests per second and maintains low latency.
  • ideal for load balancing TCP/UDP traffic and supports elastic or static IP.

Application Load Balancer:

  • functions at 7th layer of OSI model, round robin algorithm.
  • identifies incoming resource type and directs it to appropriate servers.
  • ideal for load balancing Http/Https traffic.

Cross Zone Load Balancing (CLB):

  • by default, CLB nodes distribute traffic to instances in their availability zone only.
  • we enable cross zone load balancing to route evenly across EC2 instances.
  • ELB routes each request to instance with smallest load.

Image description

Top comments (0)