Skip to content

Releases

v1.0.1: six fixes from new contributors

Choose a tag to compare

@mannietech15 mannietech15 released this 03 Dec 09:03

Six bug fixes, all from first-time contributors. Demo output is unchanged in every chapter.

Fixes

  • Ch 05, URL shortener: shorten() no longer loops forever once every random code of a length is taken; it raises LookupError (#11, fixes #8). Thanks @techkayacodes.
  • Ch 06, message queue: delete("") no longer removes a message nobody received (#12, fixes #7). Thanks @techkayacodes.
  • Ch 07, circuit breaker: a cancelled half-open trial call no longer leaves the breaker stuck half-open forever (#17, fixes #13). Thanks @cloudgpuapp.
  • Ch 09, distributed lock: renew() rejects a zero or negative ttl, like acquire() (#14, fixes #10). Thanks @ywxy12138.
  • Ch 14, event sourcing: Account.load gives the right state when the snapshot is newer than the requested version (#15, fixes #6). Thanks @jamesyshd19-cmyk.
  • Ch 24, distributed tracing: critical_path() no longer hangs on a span that takes 0 ms (#16, fixes #9). Thanks @cloudgpuapp.

Every fix comes with a regression test: 272 tests now, up from 264.

Want to contribute?

There are open issues labelled good first issue, each with a hint and the checks to run.

v1.0.0: all 24 chapters

Choose a tag to compare

@mannietech15 mannietech15 released this 03 Dec 00:27

The first complete release: all 24 chapters, each one a small simulation you run with python demo.py.

What's inside

  • 24 chapters, from rate limiters and LRU caches to Raft consensus, stream windowing and distributed tracing. Each is about 150 lines of plain Python, standard library only, with nothing to install.
  • 264 tests across the chapters, run in CI on Linux and Windows with Python 3.11 to 3.13, and on macOS daily.
  • 48 challenges, two per chapter, with tests that fail until you build them.
  • 192 interview questions (8 per chapter) and 10 full mock interviews that cite the chapter demos.
  • A terminal quiz with 96 questions: python quiz.py.
  • A one-page cheat sheet covering every chapter.

Every number in the docs is checked in CI against a real run of the demo.

A few things the demos show

  • Adding a 5th server moves 80% of keys with hash % N and 17% with a hash ring (chapter 03).
  • Lost replies charge 181 customers twice without idempotency keys, and none with them (chapter 13).
  • Async replication failover lost 3 writes that users had already been told were saved (chapter 19).
  • Halving a service off the critical path makes the request 0 ms faster; on the critical path, 29 ms (chapter 24).

Get started

git clone https://github.com/mannietech15/system-design-mastery
cd system-design-mastery/03-consistent-hashing
python demo.py

Or open it in GitHub Codespaces from the button in the README.

Contributors

Thanks to @Codre01 for contributing.