Networking and Content Delivery
Elastic Load Balancing (ELB)
Automatically distributes incoming traffic across multiple targets, such as EC2 instances, containers, or IP addresses, in one or more Availability Zones, routing it only to healthy targets based on their health checks. It increases application availability and fault tolerance; it offers several types, such as Application Load Balancer, Network Load Balancer, and Gateway Load Balancer.
Exam phrases that point here
«distribute HTTP and HTTPS traffic across instances in multiple Availability Zones»
An Application Load Balancer receives web requests and spreads them across the healthy targets in its target groups, which can be in several AZs.
When not: If the traffic is TCP or UDP and calls for very low latency or static IP addresses, a Network Load Balancer fits. If users must be distributed across Regions, the load balancer is not enough: think of Amazon Route 53 or AWS Global Accelerator.
«route requests based on the URL path or host name»
The listener rules of an Application Load Balancer can forward each request to a different target group depending on the path (/api/*) or the host (api.example.com).
When not: A Network Load Balancer works at layer 4 and does not see HTTP paths or hosts. If the decision depends on the user's location or Region, the solution goes through Route 53 or Amazon CloudFront, not through the load balancer's rules.
«the load balancer needs static IP addresses or Elastic IP addresses»
A Network Load Balancer provides one static IP address per Availability Zone and lets you assign Elastic IP addresses to it, something an Application Load Balancer does not have on its own.
When not: If layer 7 features are also needed, you can put a Network Load Balancer in front of an Application Load Balancer. If the fixed IP addresses must be global and serve several Regions, AWS Global Accelerator fits.
«handle millions of requests per second with ultra-low latency over TCP or UDP»
The Network Load Balancer is designed for large-scale layer 4 traffic with very low latency, and it preserves the client's source IP address.
When not: If what matters is inspecting or routing HTTP content (paths, headers, redirects, authentication), the option is the Application Load Balancer even if the volume is high.
«transparently insert third-party virtual appliances, such as firewalls or intrusion detection systems»
The Gateway Load Balancer distributes traffic across a fleet of virtual appliances and inserts them into the network path without the traffic being addressed to them.
When not: If a third-party appliance is not required and an AWS-managed firewall is enough, AWS Network Firewall fits. To filter attacks on a web application (layer 7), AWS WAF.
«automatically replace instances that fail the load balancer's health checks»
When the Auto Scaling group uses Elastic Load Balancing health checks, it replaces the instances that the load balancer marks as unhealthy.
When not: By itself the load balancer only stops sending traffic to the unhealthy instance; the one that replaces it is Amazon EC2 Auto Scaling. Without enabling those health checks on the group, Auto Scaling only looks at the EC2 instance status.
Often paired with
- Amazon EC2
- Amazon EC2 Auto Scaling
- Amazon Route 53