Part 0 · 1 chapters · ~8 min
Anatomy of a Production Request
One request from a phone through DNS, CDN and WAF, load balancer and gateway, the app, cache, database and queue, with what each box does, what fails there, and which later part covers it.
1
Every box, in order
| box | job | typical product | typical failure |
|---|---|---|---|
| DNS | name to edge address | Route 53, Cloudflare DNS | bad record, long TTL during failover |
| CDN / WAF | TLS, caching, attack filtering | Cloudflare, CloudFront, Fastly, Akamai | WAF false positives, cache of private data |
| load balancer | spread across healthy instances | ALB, NLB, HAProxy, Envoy | idle timeout mismatch (502s), unhealthy targets |
| API gateway | auth, rate limits, routing, transformation | Kong, Apigee, AWS API Gateway | a bad route config takes everything down |
| app | business logic | your service | bugs, blocked threads, memory |
| pooler + database | durable state | PgBouncer + Postgres | connections, locks, slow queries |
| cache | fast reads, ephemeral state | Redis | stampedes, eviction, stale data |
| queue + workers | slow and retryable work | SQS, RabbitMQ, Kafka + workers | backlog growth, poison messages |
ONE REQUEST, END TO END
a mobile app tapping "send money", through every box in a typical production stack
swipe the figure sideways, or tap expand for full screen
1/5
resolve
DNS returns the address of the nearest edge (GeoDNS or an anycast IP). TTLs decide how fast traffic can move during an incident.
DNS points at the edgeTTL controls failover speed