medium Drill: full sizing of a URL shortener
Drill
100M new URLs/month, read:write 100:1, ~500 bytes/record, 5-year retention. Estimate write QPS, read QPS, and storage.
✅ Worked solution & bounds check
Worked solution
- Write QPS = 100M ÷ (30 × 86,400) ≈ ~40 writes/s.
- Read QPS = 40 × 100 = ~4,000 reads/s.
- Storage = 100M × 12 × 5 × 500 B ≈ ~3 TB.
Gate: 40 writes/s ⇒ a single primary is plenty; 4K reads/s ⇒ a cache makes it trivial; 3 TB fits one sharded DB. This is a read-mostly, small-data problem — the interesting part is key generation, not scale.
🤖 Don't fully get this? Learn it with Claude
Stuck on Drill: full sizing of a URL shortener? 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: full sizing of a URL shortener** (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: full sizing of a URL shortener** 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: full sizing of a URL shortener**. 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: full sizing of a URL shortener**. 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.