Course outline · 0% complete

0/27 lessons0%

Course overview →

Architecture 2: the classic web app

lesson 9-2 · ~10 min · 26/27

The three-tier workhorse

This is the architecture behind an enormous share of production software, and it is nothing but this course assembled:

  • An ALB (lesson 5-2) in the public subnets of two AZs owns the public address and the TLS certificate.
  • Two or more EC2 instances (unit 3) run your app, in private subnets, one per AZ. They wear sg-app, which admits port traffic only from the ALB's security group.
  • RDS Multi-AZ (unit 6) holds the data, in private subnets, wearing sg-db, which admits 5432 only from sg-app (lesson 6-2's chaining).
  • Each instance carries an IAM role (lesson 2-3) for whatever AWS access the app needs, such as presigning S3 URLs (lesson 4-3) for user uploads.

Trace a request: browser → ALB (public) → app instance (private) → database (private), and each arrow is permitted by exactly one security-group rule. Everything else is default-deny (lessons 2-2, 3-3, 5-1).

VPCinternetALB, public subnets, AZ a + AZ ballows 443 from anywhereEC2 app, AZ aprivate subnet, sg-appEC2 app, AZ bprivate subnet, sg-appRDS primary + standby, private subnetssg-db: 5432 from sg-app only
The classic web app: public ALB, app servers hidden in private subnets across two AZs, Multi-AZ database behind chained security groups. Only the gold path is reachable from outside.

Code exercise · bash

What does this minimal version of the architecture cost per month? The values are rough list prices in cents: two small app instances, the smallest Multi-AZ database, disks, and the ALB's fixed hourly charge. Run the sum and note which line is biggest.

Quiz

In the cost sum you just ran, the single most expensive line was the ALB (~$16/month before any traffic). For a hobby project, what is the honest takeaway?

Problem

One component in this architecture is the reason the app survives an entire availability zone going dark, because it notices dead servers and routes around them (lesson 5-2). Which component? (Its three-letter abbreviation or full name.)