SysDesign study
Offline — showing the cached copy.
Home / Software System Design / 2. The request path

2. The request path

One-liner. Every request crosses the same layers; latency is the sum of the hops you add.

Memorize

  • DNS (Route 53) → CDN/edge → WAF → load balancer → service → cache → database.
  • Each hop adds latency and a failure mode: prefer fewer hops for latency-critical paths.
  • L4 (NLB) preserves the source IP and is protocol-agnostic; L7 (ALB) routes by path/host and terminates TLS.
  • Health checks + multiple AZs turn a failed node into a routing decision.
  • Timeouts are part of the design: budget them per hop (e.g. 2 s total = 800/600/400/200 ms).
TYPICAL REQUEST PATH CLIENT Browser Mobile EDGE DNS CDN WAF ENTRY LB API gateway COMPUTE Service Worker DATA Cache Primary DB Replica
Typical request path

Trap. Adding an API gateway "for security" in front of a single service — it's a hop, a SPOF and a cost. Do this. For each hop, name the failure it absorbs.

Check

Which layer is the right place to absorb a volumetric L7 attack before it reaches your service?