Numbers that decide
easy 35 minAn estimate is worth doing when its answer changes what you draw.
See it run
Four sums, each ending with a decision, and a drill for the sums to skip.
Operations
Per day to per second
Recipe pages: from a daily total to a decision in four lines.
Step 1 of 5
Assume
| Step | Working | Result |
|---|---|---|
| Assume | 1M users × 20 views | 20M a day |
| Average | ||
| Peak | ||
| One database | ||
| So |
One million daily users, 20 recipe views each: 20 million a day.
Step 1: Assume
- When
- Under a minute
- You leave with
- Peak reads a second
Take five zeros off the daily total. That is the average.
In the real world
The same numbers that decide doing real jobs. Pick one and step through it.
Recipe sharing. Which sums are worth a minute?
Step 1 of 8
Photo bytes out
| The number | Worth a minute? |
|---|---|
| Photo bytes out | Calculate |
| Skip it |
600 pages a second, four photos of 500 KB.
Step 1: Photo bytes out
Common mistakes
The bugs interviewers watch for, with the fix beside each.
A sum with no decision
majorMinutes pass and the design does not change.
Wrong"So that is 51 billion a month."Right"So 600 a second at peak: one database."The average for a rush
criticalThe system fails at 9:00, the only time that matters.
Wrong"200 a second, easy."Right"20,000 people every 4 seconds: 5,000 a second."Bits and bytes
majorAn error of eight times can change the answer.
Wrong"10 Gb/s is 10 gigabytes."Right"Divide by 8: 1.25 gigabytes a second."False precision
minorThe inputs are guesses.
Wrong"11,574.07 a second."Right"About 10,000 a second."
Interview tips
Four sums
- Rate and peak.
- Storage over time.
- Work in progress.
- Machines.
Shortcuts
- Day / 100,000.
- Million a day is 10/s.
- KB × million is GB.
- Bits / 8.
Say
- "I assume..."
- "At peak..."
- "So..."
Skip
- Nothing depends on it.
- Clear within ten times.
- You will size it later.