Elastic Load Balancers
“Elastic Load Balancing automatically distributes incoming application traffic across multiple targets, such as Amazon EC2 instances, containers, IP addresses, and Lambda functions. It can handle the varying load of your application traffic in a single Availability Zone or across multiple Availability Zones. Elastic Load Balancing offers three types of load balancers that all feature the high availability, automatic scaling, and robust security necessary to make your applications fault tolerant.”
Umm.. okay?
So elastic load balancing is simply a fancy word for load balancing. What it does is it looks at your server infrastructure and makes decisions on where an incoming request gets redirected. This is commonly used for managing loads across multiple servers, so we don’t end up throwing a high amount of load on one server, while the others are chillin’
AWS provides us with 3 types of load balancers:
- Application Load Balancer
- Network Load Balancer
- Classic Load Balancer
Application Load Balancer
“Application Load Balancer is best suited for load balancing of HTTP and HTTPS traffic”
Essentially, if you create web servers and get tons of HTTP requests on it, you can use an Application Load Balancer. It will ensure that the HTTP or HTTPS requests get evenly distributed across all of them. This also means you can make decisions based on information available on the application layer, e.g. Cookies or the URL.
Network Load Balancer
“Network Load Balancer is best suited for load balancing of Transmission Control Protocol (TCP), User Datagram Protocol (UDP) and Transport Layer Security (TLS) traffic where extreme performance is required.”
Now, Imagine you want to handle requests on multiple Application layer protocols (Application Layer is a part of OSI Model), you can simply create a load balancer on the Network Layer, and hence the request doesn’t even reach the application layer before it reaches the end server, making the processing much quicker. All requests are diverted to their destination servers on the network layer itself.
Classic Load Balancer
“Classic Load Balancer provides basic load balancing across multiple Amazon EC2 instances and operates at both the request level and connection level.”
You can manage both types of load balancing with these bad boys. However, do note that Classic Load Balancers are legacy and not recommended.