Knowledge Guide
HomeSystem DesignCapacity Estimation

medium Drill: server count for an API service

Drill

An API serves 30,000 QPS at peak. Each request uses ~20 ms of CPU. Target 70% utilization on 8-core servers. How many servers?

✅ Worked solution & bounds check

Worked solution

  • CPU work = 30,000 × 20 ms = 600,000 ms/s = 600 core-seconds/sec.
  • ÷ 0.7 utilization ⇒ ~860 cores.
  • ÷ 8 cores/server ⇒ ~108 servers (+ headroom, round to ~120).

Cross-check (Little’s Law): N = 30,000 × 0.02 s = 600 concurrent requests — consistent.

Bounds: if requests are IO-bound (mostly waiting), fewer cores but more threads suffice. Ask: CPU-bound or IO-bound?

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

Stuck on Drill: server count for an API service? 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: server count for an API service** (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: server count for an API service** 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: server count for an API service**. 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: server count for an API service**. 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