1/39
Part 1 of 6 · The round and the planLearn

Size it before you design it

An ML design round often opens with numbers, before anyone draws a box. An interviewer can put it like this:

Before you design anything, show me you can size it. Here are seven quick estimates every design round needs. Talk me through each one. I care more about your method and your assumptions than the last digit.

  1. A marketplace has 40 million daily active users, and each runs 12 searches a day. What's the average search rate per second, and the peak?
  2. Each search logs the 25 listings it showed, at 150 bytes a row. How much storage is that a day, and for 180 days?
  3. You have 800 million item vectors of 128 dimensions in float32. How much memory does a flat index take, and how much with product quantization at 16 bytes of codes plus an 8-byte id per vector? Does each fit on a machine with 256 GB of RAM?
  4. A chat feature peaks at 150 requests a second, each generating 400 output tokens. One GPU sustains 2,000 output tokens a second, and you plan at 60% of that. How many GPUs, and how many 8-GPU nodes?
  5. A batch queue receives 5,000 jobs a minute, and the workers process 6,000. Processing stops for 45 minutes. How long until the backlog is gone, and how long with double the workers?
  6. A request fans out to 50 shards and waits for all of them. Each shard is slow on 1% of calls. What share of requests is slow, and what per-shard rate would keep it under 1%?
  7. Each search spends 120 ms in the ranking tier. At the peak, how many searches are in flight? One server holds 64 at once, and you plan at 70%. How many servers?

Each answer decides something: one machine or many, 6 GPUs or 600, an hour to recover or a day.

You don't answer them yet. First comes the method for the whole 45 minutes, from the first question to failure, and then the estimate behind each of the seven. The lesson ends on a mock interview with follow-ups, asked in the order a 45-minute round runs: the plan, the clarifying questions, then the numbers.