Elastic Load Balancing
2 min readOct 13, 2020
What is load balancing?
• Load balancers are servers that forward internet traffic to multiple server (EC2 Instances) downstream.
Why use a load balancer?
- Spread load across multiple downstream instances.
- Expose a single point of access (DNS) to your application.
- Seamlessly handle failures of downstream instances.
- Do regular health checks to your instances.
→ If one of them is failing then the load balancer will not direct traffic to the instance, so we can hide the failure of an EC2 instance using a load balancer. - Provide SSL termination (HTTPS) for your websites.
- High availability across zones.
Why use an Elastic Load Balancer?
• Distribute traffic across EC2 instances in one or more AZs in a single region.
• Managed service — AWS ensures that it is highly available
• Auto scales to handles huge loads
• Load Balancers can be public or private
• Health checks- route traffic to healthy instances
- An ELB (Elastic Load Balancer) is a managed load balancer.
→ELB is a managed load balancer. So you don’t need to be provisioning servers. AWS will do it for you. And AWS will guarantee that they will be working. AWS will take care of all the upgrades, maintenance and high availability of that Elastic Load Balancer. And the only thing we have to do is to configure a few things for the behavior of that load balancer.
• AWS guarantees that it will be working
• AWS takes care of upgrades, maintenance, high availability
• AWS provides only a few configuration knob - It costs less to setup your own load balancer but it will be lot more effort on your end( maintenance, integrations)
- 3 kinds of load balancers offered by AWS:
• Application Load Balancer (HTTP / HTTPS only) — Layer 7
• Network Load Balancer (Ultra-high performance, allows for TCP) — Layer 4
— -> USE FOR gaming purpose where millions of request are coming in a second.
• Classic Load Balancer (Slowly retiring ) — Layer 4 & 7
→The classic Load Balancer is part of the older generation of offering from AWS. It’s slowly retiring. it was providing layer four and seven at the same time. And one day AWS has decided to separate the classic load balancer into two newer kind of load balancer. so the application balancer and Network balancer which one is for layer seven and the other one is for layer four.