26.7 · Capacity estimates and retry storms
Interviewers want to see numbers, and incidents come from numbers nobody did: requests per second, bytes per day, and what ten thousand clients do when a server comes back.
Mental model. Write the assumptions down, compute in one unit (per second, per day), add a peak factor, and sanity-check against what one machine or one phone can do.
Numbers and storms
Back-of-envelope capacity, and retry policies under a recovery.
- Do a back-of-envelope capacity estimate for a messaging feature: writes per second, fan-out, storage and bandwidth, and what you conclude from them.
State assumptions first, then compute. Take 20 million daily active users sending 40 messages a day, each delivered to 3 recipients, 300 bytes per message, and… - What happens when ten thousand clients retry after an outage: compare fixed, exponential, full-jitter and decorrelated backoff.
Backoff delays a retry; jitter spreads the retries of many clients so they do not arrive together. The check simulates 10,000 clients that all fail at second…
More in System design & staff+
- 26.1 · Designing a whole feature: the method, a messenger, an offline reader and a store
- 26.2 · Reliability, payload budgets, and analytics and experiments
- 26.3 · Multi-brand apps and SDKs for other teams
- 26.4 · RFCs and strategy, estimating, incidents and mentoring, and organisation-level bets
- 26.5 · More whole-feature designs: a feed, a video player, a map, search-as-you-type and notifications
- 26.6 · Collaborative editing, a payments ledger and clocks in sync
- 26.8 · A rate limiter, push versus polling, a flight booking app, a swipe deck, an image browser, a ride-hailing rider app and a photo feed API