Elastic Load Balancer in AWS

Aakib
2 min readJan 20, 2023

Load balancing refers to the efficient distribution of incoming traffic across a group of multiple servers

Image showing how laod balance across multiple server when traffic is high

Above image clarify your’s doubt why balance the load is important when our website is access by lots of users at a same time so for the high availabity and better user user experiance means not let down the website when access by the user we distribute the load among multiple server of same application and autoscale the servers when traffic is high and autodegrade the servers when traffic is low

Important points when estlablishing load balancer →

  1. EC2 Instance must have private IP.
  2. Load balancer having public IP for Internet connection.
  3. EC2 instance does not require public IP it Uses ELB(elastic load balancer) public IP for Internet connection.
  4. Every incoming traffic does not need to go through the load balancer. It directly goes to EC2 instance if your request is to PING the EC2 it does not require ELB
  5. An Internet facing load balancer has a public DNS name.
  6. Domain name for context on the EC2 instance is saved by the ELB resolved by the DNS server to the ELB DNS name and hence IP address.
  7. And this is the way that how traffic from the Internet. Is goes to the ELB front end.

Load balancer is having 3 things →

  1. Listners → Listener tells us the port number of the incoming request and send request there.
  2. Target group → It is the group of the EC2 instance where the listener send the incoming request.
  3. Target → It is that particular EC2 instance say target where the listeners sends the incoming request.

Listeners Types →

  1. Frontend listener → It checks for traffic from client to the listener.
  2. Backend listener → It transferred the request to EC2.

ELB Recommendations and features →

  1. Instance is not deleted when load balancer delete.
  2. ELB supports IPV4 in a VPC.
  3. For fault tolerance it is recommended that you distribute your EC2 to in different availability zone.
  4. If possible try to allocate same number of EC2 in every AZ(availability zone)
  5. ELB also monitor health and route traffic only healthy instance.
  6. Registered instance must respond HTTP “200 OK” message within the time period as it will be considered unhealthy.
  7. Response time out is default 5 second (range is 2–60 seconds)

--

--

Aakib

Cloud computing and DevOps Engineer and to be as a fresher I am learning and gaining experiance by doing some hands on projects on DevOps and in AWS OR GCP