Still to practice

Lesson 1.4 · 4 min read · by Vinay C

We'll cover the following

Reading is not the same as being able to do it

You have finished the handbook. The next step is to practice, because a design you can explain on paper is not yet one you can build live in 45 minutes. A few skills only come from repetition: choosing shard keys, doing the math out loud, and running a whole interview end to end.

Drill 1: shard-key choice

Pick a key for each system below and say what goes wrong. Do this until the reasoning is automatic.

SystemKeyResult
Usersuser_idSmooth. Users are spread evenly.
Tweetsuser_idHurts. A celebrity account piles huge traffic onto one shard.
Log systemdateHot current-day shard. All writes hit today's shard while old ones sit idle.

For every new problem, ask: which key spreads writes evenly, and which one makes a single shard the hot one?

Drill 2: estimation out loud

Redo the math on a bigger problem, such as a Twitter-style feed. Say each step aloud: users, requests per second, peak versus average, storage per day and per year. Then say what the numbers choose (one database, or sharding). Talking is the point, since in an interview you must be right and audible at the same time.

Drill 3: a full mock, end to end

Take a URL shortener or a news feed and lead the whole thing yourself. Open with the ACTORS and SCALED checklist from the questions lesson, turn the answers into numbers, name the hard part, draw the boxes, then deep dive.

A weekly practice loop

  1. Once a week, run one 45-minute mock on a new problem. Time it: 5 minutes of requirements, 5 of estimates, 10 of high-level design, 20 of deep dive, 5 to close.
  2. Right after, score yourself with the checklist below. Be strict.
  3. Write one line: what made this problem special? Over several problems these lines become your pattern library.
  4. Pick the weakest item and revisit the lesson for it before the next mock.

Self-review checklist

  • Requirements: did I ask ACTORS and SCALED questions, and say what is out of scope?
  • Numbers: did I estimate QPS and storage, and let them choose the design?
  • Hard part named: did I say it early and spend my deep dive there?
  • Failure modes: did I raise slow, down, duplicated and 100x bigger without being asked?
  • Trade-offs with costs: did every choice come with what it costs?

Which lessons to revisit

Map each miss to a lesson. Skipped questions: go back to questions. Numbers felt shaky: redo Back-of-envelope estimation. Failure modes were thin: reread Microservices (failure isolation), Rate limiting, backpressure and load shedding and Disaster recovery and multi-region. Trade-offs were vague: reread the lessons on the technologies you named. Revisit only the lesson behind your lowest score, then test it in the next mock.

Check yourselfYou finish a mock on a log system and sharded by date. What do you say, and what would you change?

Date makes the current-day shard hot, because every new write lands there while older shards sit idle. Choose a key that spreads writes, such as a hash of source or log id, and handle date queries by also keeping time ranges (for example, date as a secondary partition or index).

Summary: say it in the interview

  • Habit to build: after the boxes, always say "here is where it breaks at 10x, and what I would change."