Cache
Statement
A news feed: 3000 requests per second, almost all reads (85 %). Even the largest database handles at most 3000 units per second and a write costs 3 units — so the database cannot take the reads alone. Attach a cache to the app server: a share of the reads (60–95 % depending on memory) never reaches the database. Cache misses go to the database. Spread the load with a load balancer over several server groups.
Constraints
- p95 ≤ 250 ms, errors ≤ 0.1 %, budget $2800/month, ≤ 5 instances per node.