Hi All, this document deals with different types of load balancer in AWS. The load balancer is one if the technology used in Computing which can distribute workload on various resources attached to the load balancer,
Load balancing can be done for resources such as network links, computer cluster and many more. Implementation of load balancer increases the performances of the resource. It helps to scale the resources.
Looking into AWS load balancer which Elastic load balancer was commonly known as ELB. Now there are 3 different types of elastic load balancer, Classic load balancer, application Loadbalancer, network load balancer.
Initially, AWS came with Classic load balancer which was the first version of Elastic load balancer they introduced. Then, later on, AWS came up with an application load balancer and a network load balancer which can be used for the infrastructure requirements.
Now let’s go through each Elastic Loadbalancer,
Loadbalancer provides the single point of contact for clients. A classic load balancer distributes the incoming traffic to all the multiple EC2 instances available in different availability zones.
Loadbalancer has a health check to check whether the ec2 instances associated with an elastic load balancer is healthier or not. Elastic load balancer always routes all its traffic to healthy instances based on the health check result.
Loadbalancer provides high availability for your applications. Loadbalancer is highly scalable and it can withstand any huge amount of incoming traffic.
Here is the diagram represent the CLASSIC load balancer topology.
The elastic load balancer has Lister which listens to the incoming traffic and routes the traffic to one or more healthier instances. it is always a best practice to keep the same number of the instances in different availability zone to provide high availability for your application.
BENEFITS of CLASSIC Loadbalancer
* Support for Ec2-CLASSIC
* support sticky sessions
* Support TCP/SSL listeners
APPLICATION LOAD Loadbalancer
Application load balancer differs from the CLASSIC load balancer. The application load balancer distributes traffic to multiple targets such as ec2 instances which are in different availability zones.
listener checks the incoming requests and forwards to one or more target group based on the condition, rule, and port. APPLICATION load balancer works based on rules which are defined in the load balancer.
When any rule accepts the rule the traffic is forwarded to the respective target groups. From the target groups then its distributed to multiple targets based on the health check results.
For more understanding, you can check this below diagram. APPLICATION load balancer works on layer 7. You can add or remove targets from your load balancer without disturbing the flow to the application.
BENEFITS of the application load balancer
*Support for path-based routing
*Support for host-based routing.
*Support for containerized applications and many more
NETWORK load balancer works as the same of the application load balancer. The Listener listens for any TCP any port. where application load balancer listens for any HTTP and https ports.
The network load balancer can handle millions of requests per second and it works on the fourth layer of the OSI model.
The network load balancer distributes its traffic to target groups target based on the health checks
You can add and remove targets from your load balancer as your needs change, without disrupting the overall flow of requests to your application.
BENEFITS of the network load balancer
Ability to handle volatile workloads and scale to millions of requests per second.
Support for registering targets by IP address, including targets outside the VPC for the load balancer.
Ideal for load balancing of TCP traffic, NLB is capable of handling millions of requests per second while maintaining ultra-low latencies. NLB is optimized to handle sudden and volatile traffic patterns while using a single static IP address per Availability Zone.
© 2019, Techrunnr. All rights reserved.