REQUEST PATH
USERS > INTERNET > CDN/WAF/RATE LIMIT > LOAD BALANCER > APP SERVER > CACHE / QUEUE / DATABASE
At every layer a utilization rate is computed. Queuing theory means latency doesn't
grow linearly as utilization nears 100% - it grows exponentially. At 80% load the system is
still fine; at 95% it collapses.
LAYERS
APP SERVER is your request capacity. More than one requires a LOAD BALANCER.
DATABASE is the single write point. REPLICA only helps reads, CACHE stops reads before they arrive, QUEUE makes writes asynchronous.
CDN never lets static traffic reach the origin at all - the cheapest way to scale.
ATTACKS & FAILURES
WAF filters DDoS traffic at the edge. RATE LIMITER cuts bot/scraper load.
BACKUP prevents user loss during a data-loss event. MONITORING shortens every outage.
AUTOSCALER spins up temporary servers under sudden load; expensive, but it saves viral moments.
ECONOMY
Revenue = active users × how happy they are. Cost = the total rent of every resource you own.
Over-buying kills you too: idle capacity drains the treasury. Spend where the bottleneck actually is.
Above 58% satisfaction you grow; below it you shrink.