A cache is a wager that the same data gets read again before it changes. Get the read/write pattern, the eviction policy, and — the hard part — invalidation right, and one box absorbs the load that would have flattened your database.
The canonical system-design interview, built end to end: how tiny.co/aB3xK9 becomes a database lookup in single-digit milliseconds — base62, key generation, the read-heavy cache, and the scale math that makes 7 characters last a century.
Picking token bucket vs sliding window is the easy part. The real interview is what happens when the limiter runs on fifty machines: where the counter lives, why 'local counters' quietly lets 50× your limit through, and how to enforce one global cap without a round-trip on every request.
The Twitter/Instagram timeline, worked end to end. The whole system pivots on one decision — do you build a follower's feed when someone posts (push), or when they open the app (pull)? Toggle between them, watch the write and read cost flip, and see why one celebrity breaks the naive answer.