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

Two-tier HA application integration lab

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

What you’re learning today

Assemble the two-tier design into one request path and failure story. The web/app tier and relational data tier have different state, access and availability requirements. Your integration lab validates a complete architecture on paper, then injects a database-zone failure to reveal whether the HA label is justified. A request resolves the public name, reaches the ALB listener, matches a rule and reaches a healthy application target. The target authenticates to the private database and returns a response. Each hop has a distinct configuration and failure mode; describe the complete path rather than naming services as disconnected components. Application instances should be replaceable, with durable data and shared session needs stored appropriately outside one instance’s local memory or disk. Auto Scaling can replace instances without reconstructing lost local-only user state only if the design externalizes what must survive. Database availability and backups remain separate contracts.

Think of it this way

A restaurant needs both available waiters and an available kitchen; doubling waiters cannot compensate for a kitchen that has stopped.

TOPIC 01 / 03Step by step

End-to-end request path

A request resolves the public name, reaches the ALB listener, matches a rule and reaches a healthy application target. The target authenticates to the private database and returns a response. Each hop has a distinct configuration and failure mode; describe the complete path rather than naming services as disconnected components. DNS alias → ALB 443 → app 8080 → database 5432 traces the connection chain; app-group-to-database-group authorization is separate from ALB-group-to-app-group authorization. A full path reveals missing links and provides a diagnostic order, allowing a 502, timeout or database authentication error to be tied to the actual component involved rather than prompting broad changes everywhere. Drawing services without ports, principals and route relationships creates a decorative diagram; specify actual traffic and authorization contracts before calling the architecture integrated or ready for implementation.

WORKED EXAMPLE
DNS alias → ALB 443 → app 8080 → database 5432 traces the connection chain; app-group-to-database-group authorization is separate from ALB-group-to-app-group authorization.
Why this matters

A full path reveals missing links and provides a diagnostic order, allowing a 502, timeout or database authentication error to be tied to the actual component involved rather than prompting broad changes everywhere.

A common trap

Drawing services without ports, principals and route relationships creates a decorative diagram; specify actual traffic and authorization contracts before calling the architecture integrated or ready for implementation.

Read all topics in this lesson

A complete reference to revisit alongside the guided steps above.

End-to-end request path

A request resolves the public name, reaches the ALB listener, matches a rule and reaches a healthy application target. The target authenticates to the private database and returns a response. Each hop has a distinct configuration and failure mode; describe the complete path rather than naming services as disconnected components. DNS alias → ALB 443 → app 8080 → database 5432 traces the connection chain; app-group-to-database-group authorization is separate from ALB-group-to-app-group authorization. A full path reveals missing links and provides a diagnostic order, allowing a 502, timeout or database authentication error to be tied to the actual component involved rather than prompting broad changes everywhere. Drawing services without ports, principals and route relationships creates a decorative diagram; specify actual traffic and authorization contracts before calling the architecture integrated or ready for implementation.

WORKED EXAMPLE
DNS alias → ALB 443 → app 8080 → database 5432 traces the connection chain; app-group-to-database-group authorization is separate from ALB-group-to-app-group authorization.

Why this matters

A full path reveals missing links and provides a diagnostic order, allowing a 502, timeout or database authentication error to be tied to the actual component involved rather than prompting broad changes everywhere.

A common trap

Drawing services without ports, principals and route relationships creates a decorative diagram; specify actual traffic and authorization contracts before calling the architecture integrated or ready for implementation.

Stateless app and durable data

Application instances should be replaceable, with durable data and shared session needs stored appropriately outside one instance’s local memory or disk. Auto Scaling can replace instances without reconstructing lost local-only user state only if the design externalizes what must survive. Database availability and backups remain separate contracts. A login session stored only in one instance’s memory can disappear when the ALB sends the next request elsewhere or the ASG replaces that instance; sticky routing is not equivalent to durable session storage. State placement makes scaling and failover predictable and prevents infrastructure redundancy from hiding a user-visible loss of data or sessions during routine instance replacement or a zone failure that the design claims to tolerate. Calling the app stateless while storing uploads on one root volume creates data loss on replacement; list every persistent datum and assign an intentional storage and recovery policy.

WORKED EXAMPLE
A login session stored only in one instance’s memory can disappear when the ALB sends the next request elsewhere or the ASG replaces that instance; sticky routing is not equivalent to durable session storage.

Why this matters

State placement makes scaling and failover predictable and prevents infrastructure redundancy from hiding a user-visible loss of data or sessions during routine instance replacement or a zone failure that the design claims to tolerate.

A common trap

Calling the app stateless while storing uploads on one root volume creates data loss on replacement; list every persistent datum and assign an intentional storage and recovery policy.

Failure tests and cost inventory

HA requires defined failure scenarios, surviving capacity, database reconnection and observable outcomes. Multi-AZ placement helps but does not test the workload. Integration also requires a complete inventory of ALB, ASG instances, database, storage, gateways, logs and DNS resources with teardown dependencies and costs. A zone-loss simulation asks whether one app target remains healthy, the database can fail over and clients retry reconnectable operations safely; it must also account for whether the remaining app capacity can serve demand before replacement capacity becomes ready. Scenario-based validation turns an HA label into a testable claim and connects reliability with cost, avoiding a design that works only when all components are present at their normal load and placement. Assuming automatic failover means no application interruption overlooks reconnects and warmup; define acceptable recovery behavior and collect evidence rather than promising zero downtime solely from service feature names.

WORKED EXAMPLE
A zone-loss simulation asks whether one app target remains healthy, the database can fail over and clients retry reconnectable operations safely; it must also account for whether the remaining app capacity can serve demand before replacement capacity becomes ready.

Why this matters

Scenario-based validation turns an HA label into a testable claim and connects reliability with cost, avoiding a design that works only when all components are present at their normal load and placement.

A common trap

Assuming automatic failover means no application interruption overlooks reconnects and warmup; define acceptable recovery behavior and collect evidence rather than promising zero downtime solely from service feature names.

KEEP THESE WITH YOU

Today’s takeaways

Trace the whole request.

Place state intentionally.

Validate HA through scenarios.

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