Unofficial study companion · updated December 2026

Alex Xu's System Design Interview, chapter by chapter practice

Alex Xu's System Design Interview books are some of the most recommended reading for system design interviews. This page is an unofficial companion. For every chapter of Volume 1 and Volume 2 it gives the Codemia problem to practise it on, where you design the system yourself and get AI feedback, plus lessons for the ideas behind it.

Video transcript

Alex Xu's System Design Interview books are some of the most recommended reading for system design interviews. Volume one starts with scaling from zero to millions of users, estimation, and an interview framework, then works through classic designs. Volume two, written with Sahn Lam, goes on to harder ones, from proximity search to a stock exchange.

Each chapter walks through one design, from requirements to deep dive, with clear diagrams. That makes them good to read before you practise. Codemia's unofficial companion maps every chapter of both volumes. 29 chapters, and 31 practice problems.

Here's a six week plan. Foundations, then building blocks. Then product designs, like the news feed and chat. Two weeks on Volume two, and a final week of mock rounds. For each chapter, read it once, then close the book. Open the matching problem, and design it yourself in 45 minutes.

Submit it, and the AI reviewer points out missing requirements, and trade-offs you didn't mention. Then compare with the editorial. Read the books, then practise every chapter. On codemia.io/alex-xu-system-design.

16

Volume 1 chapters

13

Volume 2 chapters

31

Codemia problems mapped

6 weeks

study plan below

About the books

System Design Interview: An Insider's Guide is a two volume series by Alex Xu, who also founded ByteByteGo. Volume 1 (2020) starts with scaling a single server, back-of-the-envelope estimation and an interview framework, then works through twelve classic designs. Volume 2 (2022), written with Sahn Lam, goes on to thirteen harder designs, from proximity search to a stock exchange.

Each chapter walks through one design from requirements to deep dive, with clear diagrams. That makes them good to read before you practise. This page is not affiliated with Alex Xu or ByteByteGo and does not reproduce the books; it lists chapter titles only, so get the books themselves for the content.

Every chapter of both volumes flips over to a Codemia problem to design.

Volume 1, chapter by chapter

The first three chapters are about method, so they map to lessons. From chapter 4 on, each chapter is one design, and each maps to a Codemia problem.

  1. Chapter 1: Scale from zero to millions of users

    Load balancers, replicas, caches and stateless servers, one step at a time.

  2. Chapter 2: Back-of-the-envelope estimation

    Estimates that change a decision, not estimates for their own sake.

  3. Chapter 3: A framework for system design interviews

    Requirements, high level design, deep dive and wrap up, on a clock.

  4. Chapter 4: Design a rate limiter

    Token bucket, sliding windows and where the limiter lives.

  5. Chapter 5: Design consistent hashing

    Spreading keys over nodes so adding one moves only a slice. Practise it inside a key-value store.

  6. Chapter 6: Design a key-value store

    Partitioning, replication, quorums and conflict handling.

  7. Chapter 7: Design a unique ID generator in distributed systems

    Snowflake-style IDs, clock skew and ordering.

  8. Chapter 8: Design a URL shortener

    Key generation, redirects and a read-heavy cache.

  9. Chapter 9: Design a web crawler

    The frontier, politeness and deduplication at scale.

  10. Chapter 10: Design a notification system

    Fan-out to push, SMS and email providers with retries.

  11. Chapter 11: Design a news feed system

    Fan-out on write against fan-out on read, and the celebrity problem.

  12. Chapter 12: Design a chat system

    Persistent connections, message ordering and online presence.

  13. Chapter 13: Design a search autocomplete system

    Tries, top-k per prefix and refreshing them.

  14. Chapter 14: Design YouTube

    Upload, transcoding pipelines and serving video through a CDN.

  15. Chapter 15: Design Google Drive

    Chunked upload, sync between devices and conflict handling.

  16. Chapter 16: The learning continues

    A reading list rather than a design. Codemia's roadmap orders what to study next.

Volume 2, chapter by chapter

Every chapter in Volume 2 is a full design. Where Codemia has no exact match, the note says so and lists the closest practice.

  1. Chapter 1: Proximity service

    Geohash, quadtrees and searching nearby businesses.

  2. Chapter 2: Nearby friends

    Moving users, location updates over persistent connections and pub/sub.

  3. Chapter 3: Google Maps

    Map tiles, routing over a road graph and ETAs.

  4. Chapter 4: Distributed message queue

    Partitions, replication, consumer groups and delivery guarantees.

  5. Chapter 5: Metrics monitoring and alerting system

    Collection, a time-series store, queries and alert rules.

  6. Chapter 6: Ad click event aggregation

    Streaming aggregation, windows, late events and reconciliation.

  7. Chapter 7: Hotel reservation system

    Inventory, double booking and isolation levels.

  8. Chapter 8: Distributed email service

    Sending, receiving, storing mail and searching it.

  9. Chapter 9: S3-like object storage

    Splitting metadata from data, durability and erasure coding. The closest Codemia practice is a distributed file system.

  10. Chapter 10: Real-time gaming leaderboard

    Ranking with sorted sets and scaling the score store. No exact Codemia problem yet; these practise the same parts.

  11. Chapter 11: Payment system

    Idempotent calls to payment providers, a ledger and reconciliation.

  12. Chapter 12: Digital wallet

    Transfers between accounts that stay correct under failure.

  13. Chapter 13: Stock exchange

    An order book, a matching engine and low latency.

How to practise a chapter

Read the chapter, close the book, design it in 45 minutes, get AI feedback, then compare and fix.
  1. Read the chapter once

    Read for the shape of the design and the reasons behind each choice, not to memorise the diagram.

  2. Close the book and design it

    Open the matching Codemia problem, set a 45 minute timer, and design the system from requirements to deep dive in the workspace.

  3. Get feedback

    Submit your design. The AI reviewer points out missing requirements, weak spots and trade-offs you did not mention.

  4. Compare and fix

    Read the problem’s editorial and the chapter again. Write down the one or two things you would do differently next time.

  5. Say it out loud

    For the designs you are most likely to get, run a spoken round with the AI mock interviewer, which asks follow-up questions and scores the round.

A six week study plan

A plan for someone with a few hours on weekdays and more at weekends. Squeeze it into four weeks by doing two of the middle weeks together, or stretch it to eight by designing every problem in the tables above.

  1. Week 1 · Volume 1

    Foundations

    Volume 1, chapters 1 to 3. Take the free framework course alongside, and do one easy design, the URL shortener, on a timer.

  2. Week 2 · Volume 1

    Building blocks

    Volume 1, chapters 4 to 8: rate limiter, consistent hashing, key-value store, ID generator, URL shortener. Design three of the matching problems.

  3. Week 3 · Volume 1

    Product designs

    Volume 1, chapters 9 to 15. Design the crawler, news feed and chat problems; these come up in interviews more than any others.

  4. Week 4 · Volume 2

    Location and data

    Volume 2, chapters 1 to 6: proximity, nearby friends, maps, message queue, metrics and ad click aggregation.

  5. Week 5 · Volume 2

    Money and storage

    Volume 2, chapters 7 to 13: hotel booking, email, object storage, leaderboard, payments, wallet and stock exchange. Pick the ones closest to your target companies.

  6. Week 6 · Review

    Mock rounds

    Re-design the three chapters you found hardest without notes, then run two or three full AI mock interviews and review the scores.

Six weeks: Volume 1, then Volume 2, then mock rounds.

For a broader plan with courses and problems beyond the books, see system design interview preparation and the system design roadmap. Reading the free System Design Primer too? Its topic-by-topic companion maps each section and exercise to Codemia practice.

Here is what designing a problem on Codemia looks like, from the workspace to the AI review:

Questions people ask

Frequently asked

Who is Alex Xu?

Alex Xu is the author of the System Design Interview books and the founder of ByteByteGo, which publishes a system design newsletter, videos and courses. Volume 1 came out in 2020 and Volume 2, written with Sahn Lam, in 2022.

Is this page affiliated with Alex Xu or ByteByteGo?

No. It is an unofficial study companion made by Codemia. It lists the chapter titles so you can find the matching practice problem; buy the books or visit ByteByteGo for the content itself.

Should I read Volume 1 or Volume 2 first?

Volume 1 first. Its first three chapters cover scaling, estimation and an interview framework that the rest of both books build on. Volume 2 has harder, more specialised designs such as payments, a stock exchange and object storage.

Are the Alex Xu books enough for a system design interview?

They are among the most recommended books for it. Reading a worked design is different from producing one under time, though, so most people also practise each design themselves, out loud, and get feedback on what they missed.

Alex Xu or the System Design Primer?

The System Design Primer is a free reference organised by concept. The books walk through one full design per chapter. Many people use the primer for building blocks and the books for complete designs; Codemia has a companion page for each.

How do I practise the chapters with feedback?

After reading a chapter, open the matching Codemia problem listed on this page, design it in the workspace without the book, and submit it for AI feedback. Then read the problem’s editorial and compare.

Practise chapter 8 now

The URL shortener is free on Codemia. Design it and get AI feedback in about 45 minutes.

Design a URL shortener