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).
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?
Why
Edge filtering drops bad traffic before it consumes origin capacity; retries and pools make attacks worse.