Design brief

Design a shared cache for ten million hot entries averaging 1 KB and 100,000 reads per second. The database remains authoritative. A 95% hit rate leaves about 5,000 origin reads per second; an 80% hit rate leaves 20,000. State the origin's safe refill budget and define which reads may accept stale values. Estimate memory with replicas and operational headroom.

Draw and explain

Use Excalidraw to show applications, cache routing, membership ownership, cache nodes, and the origin boundary. Label the placement rule, topology version, value ownership, and freshness metadata. Trace a hit, a miss, and a source-data update. Draw a before-and-after placement view for adding a node, identifying the keys that move and how their bytes become available.

Stress the design

Remove a node holding a hot key while thousands of readers request it. Explain how the design limits concurrent origin work and what readers receive while refilling. Next, let clients disagree about membership during a source update. Trace which copies may remain stale and how the system converges.

Review your design

Compare replication with controlled misses using the origin budget. Check whether TTL, invalidation, and topology rollout each solve the intended problem. Explain the memory and freshness cost of stale serving, and why virtual nodes cannot divide a single key's traffic. Choose measures for movement, refill pressure, eviction, and skew.

Capture assumptions, sizing, and the tradeoffs behind your diagram.

Review is your own assessment of the design.

Drag or use the arrow keys to resize. Home collapses the brief; End collapses the canvas. Enter or double-click resets the split.
Loading drawing…