Application Load Balancer — Scale traffic across targets

What you’ll learn
The AWS Application Load Balancer (ALB) distributes incoming application traffic across multiple targets (for example Amazon EC2 instances) in one or more Availability Zones. It helps you build scalable, fault-tolerant, and highly available web applications.
This walkthrough assumes you already have a target group with healthy EC2 instances registered. You will create an internet-facing ALB, attach listeners, and confirm that requests hit different backends over time.
Prerequisites
Before you begin, make sure you have the following:
- An AWS account with access to Amazon EC2 and Elastic Load Balancing.
- An existing target group with at least two EC2 instances (or other supported targets) in good health.
Example EC2 targets
In this demo we use two different apps so you can see traffic move between instances:
- React — serves one version of the site.
- Next.js — serves another version of the site.

Refreshing the ALB DNS name may show one app or the other, depending on how the load balancer selects a target for each request. By the end of this guide you should understand that flow at a high level.
Create an Application Load Balancer
Open the AWS Management Console.
Search for Load Balancers, open the service, then choose Create load balancer.

AWS Management Console Select Application Load Balancer.
Under Basic configuration:
- Load balancer name: choose a descriptive name.
- Scheme: Internet-facing (for public web traffic).
- IP address type: IPv4 unless your VPC uses IPv6-only.

Elastic Load Balancing Under Network mapping:
- VPC: select the VPC where your targets run.
- Mappings: choose subnets in at least two Availability Zones. Ensure those AZs match where your EC2 instances (or other targets) are deployed (for example
us-east-1aandus-east-1b).

Elastic Load Balancing Under Security groups, attach groups that allow client traffic to the listener ports (typically 80 and/or 443) and allow the ALB to reach your targets on their application ports.
- You can attach up to five security groups to the load balancer.

Elastic Load Balancing Under Listeners and routing, configure at least one listener:
HTTP
- Protocol: HTTP
- Port: 80
- Default action: forward to your target group
If you have a domain and a certificate in ACM, add HTTPS as well.
- Protocol: HTTPS
- Port: 443
- Default action: forward to the same (or another) target group

Elastic Load Balancing Choose Create load balancer.

Elastic Load Balancing On the load balancers list, wait until the state is active. Copy the DNS name and open it in a browser.

Elastic Load Balancing The first request might be served by the instance running React:

Browser After refreshing, the ALB may route you to the instance running Next.js:

Browser Note: If you do not see traffic switch between targets, refresh several times. Distribution depends on algorithms, stickiness, connection reuse, and caching.
Key takeaways
An ALB fronts your app with one DNS name and spreads requests across healthy targets in multiple Availability Zones.
Listeners on 80 and 443 forward to target groups; security groups must allow both client→ALB and ALB→target traffic.
Monitor target health, tune health checks, and scale targets as load grows.
Frequently asked questions
Next: wire HTTPS and rules
After the ALB is live, add HTTPS listeners with ACM certificates and optional host/path rules as your architecture grows.
An Application Load Balancer operates at Layer 7 (HTTP/HTTPS). It can route based on host, path, headers, and methods—unlike a Network Load Balancer, which is optimised for extreme performance at Layer 4.
10 people found this page helpful
