Skip to content

Design Twitter in 45 minutes: an interview script

Kabir ShahFeatured AuthorPosted · 1 min read

An interview is a time-boxed conversation, not an essay. Here is how I split 45 minutes.

  1. Requirements (5 min). Post, follow, home timeline. Ask about scale.
  2. Estimates (5 min). Writes per second, reads per second, storage per year.
  3. API and data model (10 min). POST /tweets, GET /timeline, tweets and follows tables.
  4. High-level design (15 min). Fan-out on write, then raise the celebrity problem yourself.
  5. Deep dive (10 min). Whatever the interviewer cares about: caching, IDs or search.

Leave the last minute to summarise the trade-offs you made.

Text by Kabir Shah, licensed under CC BY-SA 4.0. You may share and adapt it with credit to the author, under the same licence.

Other approaches to Design Twitter

Submit your approach

Comments

Loading comments…