AWS Elastic Load Balancing

AWS Tutorial: Elastic Load Balancing (ELB)

Welcome to the Elastic Load Balancing (ELB) lesson. As you scale your applications horizontally across multiple EC2 instances, you need a way to distribute incoming user traffic evenly among them to prevent any single server from becoming overwhelmed.

AWS Elastic Load Balancing

Why Learn About Elastic Load Balancing?

Learning about ELB is crucial because it ensures high availability and fault tolerance for your applications. Without a load balancer, if a specific server fails, the users connected to it will experience downtime. An ELB automatically detects unhealthy instances and immediately reroutes traffic only to healthy ones.

Tutorial Overview

In this tutorial, you will learn:


What is a Load Balancer?

Imagine a popular restaurant with a single host seating guests. If the line gets too long, the host becomes a bottleneck. If you add three more hosts (Horizontal Scaling), you now need a manager at the front door directing arriving guests to the next available host. That manager acts as the Load Balancer.

In AWS, Elastic Load Balancing automatically distributes your incoming application traffic across multiple targets, such as EC2 instances, containers, and IP addresses, spread across one or more Availability Zones.

Types of Elastic Load Balancers

AWS offers different types of load balancers, each suited for specific architectural use cases:

  1. Application Load Balancer (ALB): Best for HTTP and HTTPS traffic. It operates at Layer 7 (the application layer) and allows you to route traffic based on the content of the request (e.g., routing /images URL traffic to one set of specialized servers and /video to another).
  2. Network Load Balancer (NLB): Best for TCP, UDP, and TLS traffic where extreme performance is required. It operates at Layer 4 (the transport layer) and can handle millions of requests per second while maintaining ultra-low latencies.
  3. Gateway Load Balancer (GWLB): Used primarily to deploy, scale, and run third-party virtual networking appliances, such as corporate firewalls and intrusion detection systems.

Exercise

?

Which type of AWS Load Balancer is best suited for routing standard HTTP/HTTPS web traffic based on the URL path?