teluzia.Cloud Engineer · Day 50
CHAPTER 08 · AWS SCALING AND DATABASES

Application load balancer

4–5 hours including independent practice3 topics
LET’S MAKE THIS SIMPLE

What you’re learning today

Design the HTTP entry point for a two-AZ application. An Application Load Balancer accepts requests through listeners and forwards them through rules to target groups. You will trace a request, health check and backend response independently and repair a deliberately incorrect health-check path. An ALB operates at the application layer for supported HTTP traffic. A listener has a port and protocol and evaluates rules such as host or path conditions. The default rule handles unmatched requests. HTTPS listeners need certificate configuration, and TLS termination at the ALB is separate from backend transport security. A target group defines targets, traffic settings and health checks. Health checks use configured paths, protocols and success criteria. Application readiness may depend on dependencies, but overly strict checks can amplify dependency outages. Document intended readiness behavior and inspect failure reason codes instead of guessing from a red indicator.

Think of it this way

The ALB is a reception desk: listeners are entrances, rules direct visitors, and target groups are teams receiving the work.

TOPIC 01 / 03Step by step

Listeners and routing rules

An ALB operates at the application layer for supported HTTP traffic. A listener has a port and protocol and evaluates rules such as host or path conditions. The default rule handles unmatched requests. HTTPS listeners need certificate configuration, and TLS termination at the ALB is separate from backend transport security. A listener on HTTPS 443 can forward /api/* to an API target group and use a default website group for other paths. Explicit listener rules make request destinations explainable and let you separate front-door TLS, application routing and backend connections during diagnosis. Adding a target group alone does not expose it to clients; a listener action must forward matching requests to that group.

WORKED EXAMPLE
A listener on HTTPS 443 can forward /api/* to an API target group and use a default website group for other paths.
Why this matters

Explicit listener rules make request destinations explainable and let you separate front-door TLS, application routing and backend connections during diagnosis.

A common trap

Adding a target group alone does not expose it to clients; a listener action must forward matching requests to that group.

MAKE IT VISIBLE

Follow a request through the system

FOLLOW THE SIGNAL

What happens after you press Enter?

Explore a common HTTPS request path. Select a stage, then inject a simulated failure to see what you would investigate.

STAGE 1

Find the destination

The browser resolves a hostname to an address using DNS. A cached answer may avoid a new lookup. If resolution fails, the request never reaches the server.

Read all topics in this lesson

A complete reference to revisit alongside the guided steps above.

Listeners and routing rules

An ALB operates at the application layer for supported HTTP traffic. A listener has a port and protocol and evaluates rules such as host or path conditions. The default rule handles unmatched requests. HTTPS listeners need certificate configuration, and TLS termination at the ALB is separate from backend transport security. A listener on HTTPS 443 can forward /api/* to an API target group and use a default website group for other paths. Explicit listener rules make request destinations explainable and let you separate front-door TLS, application routing and backend connections during diagnosis. Adding a target group alone does not expose it to clients; a listener action must forward matching requests to that group.

WORKED EXAMPLE
A listener on HTTPS 443 can forward /api/* to an API target group and use a default website group for other paths.

Why this matters

Explicit listener rules make request destinations explainable and let you separate front-door TLS, application routing and backend connections during diagnosis.

A common trap

Adding a target group alone does not expose it to clients; a listener action must forward matching requests to that group.

Target groups and health

A target group defines targets, traffic settings and health checks. Health checks use configured paths, protocols and success criteria. Application readiness may depend on dependencies, but overly strict checks can amplify dependency outages. Document intended readiness behavior and inspect failure reason codes instead of guessing from a red indicator. A check for /health returns 200 only when the target is ready under the chosen policy; using /missing produces 404 even when the application root works. Target-health evidence narrows routing failures and makes readiness policy a deliberate contract rather than a path copied from an unrelated example. A successful root page does not prove the configured health endpoint succeeds; test the exact path and expected status that the load balancer evaluates.

WORKED EXAMPLE
A check for /health returns 200 only when the target is ready under the chosen policy; using /missing produces 404 even when the application root works.

Why this matters

Target-health evidence narrows routing failures and makes readiness policy a deliberate contract rather than a path copied from an unrelated example.

A common trap

A successful root page does not prove the configured health endpoint succeeds; test the exact path and expected status that the load balancer evaluates.

Network path and zone placement

An internet-facing ALB needs appropriate public subnet placement, addressing behavior and inbound rules. Targets may remain in private subnets. Allow ALB-to-target traffic through narrowly scoped security-group relationships, and place targets across zones with enough surviving capacity. Front-door availability does not eliminate backend bottlenecks. Client → ALB TCP 443 and ALB group → app group TCP 8080 are distinct paths; opening app port 8080 to the whole internet is unnecessary. Separating frontend and backend admission reduces exposure and clarifies why a reachable ALB can still return errors when target connections or application responses fail. Opening the target broadly to bypass a failing ALB-to-target rule hides the actual relationship error; inspect groups, ports and health before widening access.

WORKED EXAMPLE
Client → ALB TCP 443 and ALB group → app group TCP 8080 are distinct paths; opening app port 8080 to the whole internet is unnecessary.

Why this matters

Separating frontend and backend admission reduces exposure and clarifies why a reachable ALB can still return errors when target connections or application responses fail.

A common trap

Opening the target broadly to bypass a failing ALB-to-target rule hides the actual relationship error; inspect groups, ports and health before widening access.

KEEP THESE WITH YOU

Today’s takeaways

Connect listeners, rules and targets.

Define meaningful health checks.

Scope both network paths.

CLOSE THE LOOP

Ready to complete this day?

Verify the practical steps and pass the knowledge check (at least two thirds correct).

Lab steps verifiedKnowledge check passed