Application Load Balancer — Scale traffic across targets

Intermediate
⏱️ 11 min read
📚 Updated: Aug 2025
EC2 / ELB / ALB

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.
Two EC2 instances registered as targets behind a load balancer
EC2 and target group

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

  1. Open the AWS Management Console.

  2. Search for Load Balancers, open the service, then choose Create load balancer.

    Elastic Load Balancing console with Create load balancer
    AWS Management Console
  3. Select Application Load Balancer.

  4. Under Basic configuration:

    1. Load balancer name: choose a descriptive name.
    2. Scheme: Internet-facing (for public web traffic).
    3. IP address type: IPv4 unless your VPC uses IPv6-only.
    ALB basic configuration name scheme and IP type
    Elastic Load Balancing
  5. Under Network mapping:

    1. VPC: select the VPC where your targets run.
    2. 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-1a and us-east-1b).
    ALB network mapping VPC and subnet selection
    Elastic Load Balancing
  6. 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.
    ALB security group selection
    Elastic Load Balancing
  7. Under Listeners and routing, configure at least one listener:

    1. HTTP

      • Protocol: HTTP
      • Port: 80
      • Default action: forward to your target group
    2. 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
    ALB listeners and default routing to a target group
    Elastic Load Balancing
  8. Choose Create load balancer.

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

    ALB provisioning state and DNS name
    Elastic Load Balancing
  10. The first request might be served by the instance running React:

    Browser showing React app via ALB DNS name
    Browser
  11. After refreshing, the ALB may route you to the instance running Next.js:

    Browser showing Next.js app via same ALB DNS name
    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

1

An ALB fronts your app with one DNS name and spreads requests across healthy targets in multiple Availability Zones.

2

Listeners on 80 and 443 forward to target groups; security groups must allow both client→ALB and ALB→target traffic.

3

Monitor target health, tune health checks, and scale targets as load grows.

Frequently asked questions

An Application Load Balancer (ALB) is a Layer 7 load balancer that distributes HTTP and HTTPS traffic across targets in one or more Availability Zones within an AWS Region.
ALB is for HTTP/HTTPS with advanced routing rules. NLB is a Layer 4 load balancer optimised for TCP/UDP throughput, static IPs, and preserving client IP at the connection level.
Mapping subnets in at least two zones lets AWS place redundant load balancer nodes and maintain availability if a single zone degrades.

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.

Create an Application Load Balancer (step by step) →
Did you know?

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.

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

10 people found this page helpful