FreeReference architectureAWS

AWS 3-tier request flow

In one sentence: Each tier does one job, so each can scale and fail on its own.

Explain it for a
Scenario
Inspect:

Read this explainer as text

Page request

Beginner

  1. You click a link. Your browser sends a request to the site’s front door.
  2. The front door, called a load balancer, picks a web server that isn’t busy.
  3. The web server asks the app server to do the real work.
  4. The app server looks up your data in the database.
  5. The database hands the data back.
  6. The app server turns that data into an answer.
  7. The answer heads back out through the front door.
  8. Your page appears. All of that took a fraction of a second.

Practitioner

  1. The browser sends an HTTPS request to the Application Load Balancer.
  2. The ALB terminates TLS and routes to a healthy web instance.
  3. The web tier calls the app tier in a private subnet.
  4. The app tier queries the database in an isolated data subnet.
  5. The database returns the result set.
  6. The app tier builds the response payload.
  7. The web tier returns it through the ALB.
  8. The user receives the page. Round trip complete.

Architect

  1. DNS resolves to the ALB and TLS is negotiated at the edge of the VPC.
  2. Listener rules and target-group health checks select an instance across zones.
  3. East-west call on security-group-scoped ports; the app tier has no public route.
  4. Pooled connections hit the primary; read replicas could absorb read traffic.
  5. The result returns. This hop is the usual latency and scaling bottleneck.
  6. The stateless app tier serializes the response; any instance could have served it.
  7. The response flows back through the ALB on reused keep-alive connections.
  8. End to end, every tier scaled and failed independently.

Static file

Beginner

  1. Your browser asks for an image.
  2. The front door sends the request to a web server.
  3. The web server already has the file, so nobody bothers the database.
  4. The image arrives. Short trip, fast answer.

Practitioner

  1. The browser requests a static asset.
  2. The ALB routes to a web instance.
  3. The web tier serves the file directly, skipping the app and data tiers.
  4. Asset delivered. A CDN would make this trip even shorter.

Architect

  1. A GET for a static object hits the ALB.
  2. It is routed to the web target group.
  3. Served from the web tier; the app and data tiers stay idle.
  4. A clear candidate for edge caching: offload this path to a CDN.

Now add…

Take it with you

Pro adds video downloads, with embeds and editable source coming soon. Core explainers are always free to watch.

Download video (Pro)EmbedComing soonEditable sourceComing soon
Pro explainer

Continue with Pro

is for Pro members. Pro unlocks the full walkthrough at three levels, every scenario, break-it mode and video download.