Knowledge Guide
HomeSystem DesignCapacity Estimation

medium Drill: cache size for a hot-key store

Drill

A key-value store holds 1 billion items, ~500 bytes each. ~10% are hot. Redis overhead ~40%. Size the cache and decide if it fits one node.

✅ Worked solution & bounds check

Worked solution

  • Working set = 0.10 × 10⁹ × 500 B = 50 GB.
  • × 1.4 overhead ≈ ~70 GB.

Gate: ~70 GB fits a single large Redis node (e.g. 128 GB RAM) — but you’re near the ceiling, so plan to shard (consistent hashing) before the hot fraction grows past ~200 GB.

🤖 Don't fully get this? Learn it with Claude

Stuck on Drill: cache size for a hot-key store? Open Claude, copy a block below, and it'll teach you this exact concept — visually and interactively.

🪜 Hint ladder (no spoilers)

Progressively stronger hints — you still solve it.

I'm working on the problem **Drill: cache size for a hot-key store** (System Design). Give me a HINT LADDER: start with the tiniest nudge, then wait. Only reveal the next, stronger hint when I ask. Do NOT show the full solution unless I type 'show solution'. Keep me doing the thinking. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🎨 Explain the approach visually

See the technique, not just code.

Explain the optimal approach to **Drill: cache size for a hot-key store** with a VISUAL walkthrough: trace it on a small concrete example using ASCII art / a step-by-step diagram, narrate what changes each step, then give time & space complexity with a one-line derivation. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🔍 Review my solution

Catch bugs, edge cases, sub-optimality.

I'll paste my solution to **Drill: cache size for a hot-key store**. Review it for correctness, missed edge cases, and time/space complexity, then coach me toward the optimal — don't just rewrite it. Ask me to paste my code now. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🔁 Drill the pattern

Lock in recognition with look-alikes.

Give me 2 problems that use the SAME underlying pattern as **Drill: cache size for a hot-key store**. For each, let me attempt first, then review my answer and name the trigger signal that reveals the pattern. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.

📝 My notes