System Design and Architecture
Learn how Uber, Netflix, Stripe, and modern AI agents are built, one system at a time.
A practical, diagram-first guide for engineers who build real systems and ace system design interviews.
Start here · What's new · Case studies · Theories · Interview prep · 简体中文 · Website
⭐ Star this repo to follow new chapters as they land.
The 2nd Edition is a work in progress. New chapters are published regularly, so watch the repo for updates.
Why this book
Since 2015, _System Design and Architecture_ has helped software engineers around the world land roles and design better systems. It works because it is:
- 🌎 Grounded in real systems. Every design starts from how companies such as Uber, Facebook, Netflix, Stripe, and Dropbox actually build their products.
- 🍕 Easy to digest. System design at the right level of abstraction is a map that gets you to the destination by the shortest route. Charts, diagrams, and step-by-step guides give you the minimum actionable knowledge to excel in interviews and start building.
- 🤲 Broad. It covers backend to frontend, and classic distributed systems to LLM inference and AI agents.
- 🚶♀️ Repeatable. Every design follows the same 4-step framework:
Start here
| If you are... | Read this path | | ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | | 🧑💼 Senior (Google L5+) | Go straight to System Design in Practice. | | 🧑💻 Junior or mid-level (Google L3/L4) | Read System Design Theories first, then System Design in Practice. | | 🌱 Just starting out | Begin with Prepare for an Interview effectively, then Theories, then Practice. |
What's new
The 2nd Edition covers what changed between 2015 and today: mobile ate the world, cloud-native computing arrived with Kubernetes, web3 rose and fell, and AI agents became a new class of system. Recent additions:
Also coming in the 2nd Edition: more companies and products, existing chapters rewritten for current trends, more diagrams with step-by-step guides, a PDF edition, and less repetition so that each design teaches its own abstraction.Out of scope: API design for specific domains (see Google's API design guide) and deep object-oriented design.
System Design in Practice
🤖 AI and Agents
| Product | Question |
| -------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
| Designing an Always-on Agent |
|
| Designing a recommendation system |
|
| Fraud Detection with Semi-supervised Learning |
📱 Social, Media, and Marketplaces
| Product | Question |
| --------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
| Designing Instagram or Pinterest |
|
| Designing Uber |
|
| Designing Airbnb or a hotel booking system |
|
| How Facebook Scale its Social Graph Store? TAO |
|
| How Netflix Serves Viewing Data? |
|
| How to stream video over HTTP for mobile devices? HTTP Live Streaming (HLS) |
|
| Lyft's Marketing Automation Platform -- Symphony |
|
| Designing typeahead search or autocomplete |
|
| Designing Online Judge or Leetcode |
💳 Payments and Fintech
| Product | Question |
| -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
| How to design robust and predictable APIs with idempotency? |
|
| Designing payment webhook |
|
| Designing Square Cash or PayPal Money Transfer System |
|
| Designing Stock Exchange |
|
| Designing Smart Notification of Stock Price Changes |
🏗️ Storage and Infrastructure
| Product | Question |
| -------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
| Designing a distributed logging system |
|
| Designing a URL shortener |
|
| Designing a KV store with external storage |
|
| Designing a distributed in-memory KV store or Memcached |
|
| Designing Facebook photo storage |
|
| Designing a metric system |
|
| Designing a Load Balancer or Dropbox Bandaid |
System Design Theories
Foundations
- Introduction to Architecture
- How to scale a web service?
- Concurrency Model
- Cloud Design Patterns
- Public API Choices
- Load Balancer Types
- How to do capacity planning? _(coming soon)_
- ACID vs BASE
- Data Partition and Routing
- Replica, Consistency, and CAP theorem
- Improving availability with failover
- Intro to Relational Database
- 4 Kinds of No-SQL
- Key value cache
- Stream and Batch Processing Frameworks
- Lambda Architecture
Prepare for an Interview effectively
- Crack the system design interview
- What can we communicate in soft skills interview?
- Experience Deep Dive
- Introduction to software engineer interview _(coming soon)_
- How to crack the coding interview, for real? _(coming soon)_
- Culture fit _(coming soon)_
- Be a software engineer - a hero's journey _(coming soon)_
Read in your language
- 🇺🇸 English: you are here
- 🇨🇳 简体中文
About the author
Tian Pan is a software engineer and engineering manager who has worked in the San Francisco Bay Area for 10+ years, at Uber, Oracle, IoTeX, and Microsoft. More notes live at tianpan.co.
Community and contributing
- 💬 Join the discussion on Telegram or Discord.
- 🐛 Found a typo, a broken diagram, or a gap in a design? Open an issue or send a PR.
- 🌐 Translations are welcome. Chapters in
en/andzh-CN/use identical filenames.
License
GPL v3
Found this useful? ⭐ Star the repo. Spotted a gap? Open a PR.