Use Elastic Load Balancing to distribute traffic across the instances in your Auto Scaling group
Elastic Load Balancing types
– Application Load Balancer
– Network Load Balancer
– Gateway Load Balancer
– Classic Load Balancer
Which usages?
Application Load Balancer: Flexible application management
Network Load Balancer: Extreme performance and static IP is needed for your application
Classic Load Balancer: Existing application built within the EC2-Classic network.
Elastic Load Balancing types
Benefits Classic Load Balancer instead of Application Load Balancer:
– Support for EC2-Classic
– Support for TCP and SSL listeners
– Support for sticky sessions using application-generated cookies
Benefits Application Load Balancer instead of Classic Load Balancer :
– Support for Path conditions. You can configure rules that forward requests based on the URL in the
request.
– Support for Host conditions. You can configure rules that forward requests based on the host field in
the HTTP header.
– Support for routing based on fields in the request, such as HTTP header conditions and methods, query parameters, and
source IP addresses.
– Support for routing requests to multiple applications on a single EC2 instance. You can register an instance or IP
address with multiple target groups, each on a different port.
– Support for redirecting requests from one URL to another.
– Support for returning a custom HTTP response.
– Support for registering targets by IP address, including targets outside the VPC for the load balancer.
– Support for registering Lambda functions as targets.
– Support for the load balancer to authenticate users of your applications through their corporate or social identities
before routing requests.
– Support for containerized applications. Amazon Elastic Container Service (Amazon ECS) can select an unused port when
scheduling a task and register the task with a target group using this port.
– Support for monitoring the health of each service independently, as health checks are defined at the target group level
and many CloudWatch metrics are reported at the target group level.
– Access logs contain additional information and are stored in compressed format.
– Improved load balancer performance.
Overview
Elastic Load Balancing automatically distributes your incoming application traffic across all the EC2 instances that you are running. Elastic Load Balancing helps to manage incoming requests by optimally routing traffic so that no one instance is overwhelmed. To use Elastic Load Balancing with your Auto Scaling group, attach the load balancer to your Auto Scaling group. This registers the group with the load balancer, which acts as a single point of contact for all incoming web traffic to your Auto Scaling group.