Skip to content

Repository files navigation

Grokking System Design

The free, open companion to the original Grokking the System Design Interview course by DesignGurus.io, created by Arslan Ahmad and the original Grokking team.

GitHub stars Last commit License: CC BY 4.0 PRs welcome

Most candidates prepare by memorizing answers to a list of questions, then meet a question that is not on the list. This repo takes the other approach. You learn a small set of building blocks, like caching, sharding, replication, and consistency, then apply them to any design problem. Everything here is free to read in your browser, with no account.

30 patterns · 59 questions · 122 company guides · 19 deep dives · 27 cheat sheets · 4 roadmaps · 134 diagrams

Start here

Your situation Start with
My interview is in days 1-week crash plan, then system design in one page
I have a few weeks 6-week study plan, working through patterns/ as you go
I am senior and have not interviewed in years Senior and staff refresher, which opens with a diagnostic
I have an interview at a named company Company guides, covering 122 companies
I just want to practice Question catalog and the practice bank

The system design interview framework

A repeatable structure beats memorized answers. The seven steps fall into two halves, and they are not equally important.

flowchart LR
    subgraph Frame["Agree on the problem: 17 min"]
        direction TB
        S1["1. Requirements<br/>5 min"] --> S2["2. Estimation<br/>3 min"]
        S2 --> S3["3. API<br/>4 min"]
        S3 --> S4["4. Data model<br/>5 min"]
    end
    subgraph Build["Design and defend it: 28 min"]
        direction TB
        S5["5. High-level design<br/>10 min"] --> S6["6. Deep dive<br/>13 min"]
        S6 --> S7["7. Bottlenecks<br/>5 min"]
    end
    Frame -->|"scope is now fixed"| Build
Loading

The first half exists to earn the right to the second half. Most of the hiring signal is produced in steps 5 to 7, so treat the first four steps as a budget to protect rather than a place to be thorough.

Full breakdown, with what to say at each step and the common failure in each: the interview framework.

Most read pages

If you read only five things here, read these.

  1. The interview framework, the structure above in full.
  2. Caching, the pattern that appears in almost every design.
  3. Design TinyURL, the walkthrough to read first.
  4. Back-of-the-envelope estimation, the numbers worth memorizing.
  5. Non-functional requirements, the vocabulary interviewers grade you on.

Core building blocks (patterns)

Pattern What it solves
Caching Read latency and load on the data store
Load balancing Distributing traffic across servers
Sharding and partitioning Scaling data beyond one machine
Replication Availability and read scaling
Consistency models Correctness under concurrency
Consistent hashing Even distribution with minimal reshuffling
Message queues Decoupling and async processing
Rate limiting Protecting services from overload
CAP theorem Reasoning about trade-offs under partitions
CDN Serving static content close to users
Database indexing Fast lookups
Bloom filters Cheap "definitely not present" checks

These twelve are the ones worth knowing cold. All 30 live in patterns/, including API gateways, quorum, leader election, idempotency, write-ahead logs, circuit breakers, sagas, event sourcing, and gossip. Each is taught in depth in the System Design Patterns course. To add a new pattern, copy patterns/_template.md.

System design questions

Fifty-nine walkthroughs at the approach-and-trade-offs level. The question catalog lists them with difficulty and the patterns each one exercises. To self-test without solutions, use the practice bank.

Basic. TinyURL · rate limiter · unique ID generator · distributed cache · API gateway · typeahead · notification system · YouTube likes counter · Amazon shopping cart

Advanced. Instagram · Twitter · WhatsApp · Reddit · YouTube · Discord · Amazon S3 · Google Calendar · Gmail · Airbnb · metrics and monitoring · recommendation system · People You May Know · LinkedIn connections · ad click aggregator · live comment streaming · code deployment · Google News · code judging · distributed job scheduler · Ticketmaster · gaming leaderboard · proximity service · hotel reservation

Expert. Uber · Netflix · Dropbox · web crawler · payment system · flash sale · reminder and alert · Google Search · Google Docs · collaborative whiteboard · stock exchange · Google Ads · ChatGPT · Amazon Lambda · Google Maps · food delivery · Zoom · distributed message queue

AI and LLM systems

The fastest-growing question category, asked heavily by AI labs and increasingly by big tech. These are written for a general system design round. If your round is an AI or ML round, where the interviewer digs into training data, evaluation, and cost per request, use the companion repository Grokking AI System Design.

RAG pipeline · semantic search · LLM inference platform · model evaluation pipeline · AI agent orchestration · GPU cluster scheduler · AI code assistant · LLM gateway

To add a new question, copy questions/_template.md.

Cheat sheets

Twenty-seven quick-reference pages, grouped by how you use them. Full index at cheat-sheets/.

Running the interview. Interview framework · system design in one page · non-functional requirements · communication tips · common mistakes · senior vs staff expectations · a mock interview, annotated

Numbers and recall. Back-of-the-envelope estimation · latency numbers, visualized · core components reference · flashcards

Choosing a technology. Trade-off decision guides · SQL vs NoSQL · PostgreSQL vs DynamoDB vs Cassandra · DynamoDB vs MongoDB · Redis vs Memcached · Kafka vs RabbitMQ vs SQS · Kafka vs Kinesis vs Pub/Sub · REST vs gRPC vs GraphQL · WebSockets vs SSE vs long polling · AWS vs GCP vs Azure · caching strategies · push vs pull feeds · rate limiting algorithms · sharding strategies · strong vs eventual consistency · L4 vs L7 load balancing

Study roadmaps

Each roadmap states its own coverage, and roadmaps/ has a decision tree for picking one.

Company-specific interviews

The same question plays differently at different companies. A rate limiter at Stripe is an API-contract exercise, at xAI it turns into implementation, and at Bloomberg it scales to Terminal fan-out. The company index covers 122 companies: the signature questions candidates report, what interviewers probe, and which patterns to review for each.

Includes Stripe, OpenAI, Bloomberg, Databricks, Discord, Palantir, Robinhood, Figma, Citadel, LinkedIn, and 112 more, grouped by sector.

Distributed systems deep dives

Case studies of landmark systems, the "how does X work" questions common in senior interviews: Dynamo, Cassandra, BigTable, Kafka, Chubby, GFS, HDFS, Spanner, Raft, MapReduce, ZooKeeper, Memcached at Facebook, Aurora, and DynamoDB, plus the infrastructure behind modern stacks: Borg and Kubernetes, Redis internals, Elasticsearch and Lucene, Flink, and HNSW and vector databases. See deep-dives/ for all nineteen, with a suggested reading order.

Glossary

New to the vocabulary? Start with the glossary.

Go deeper: the full course

This repo gives you the map. The course gives you the territory: interactive diagrams, video lessons, worked solutions, and practice.

What is "Grokking System Design"?

"Grok" means to understand something so completely that it becomes intuitive. Grokking System Design is the pattern-based approach to system design interviews: instead of memorizing answers to a fixed list of questions, you learn a small set of reusable building blocks that appear again and again across very different systems. Once you know the patterns, any new design problem feels familiar.

This methodology was created by Arslan Ahmad. The original, fully updated course lives at DesignGurus.io.

Is there a Grokking System Design PDF or book?

No. There is no official PDF, ebook, or printed book of the Grokking the System Design Interview course, and there never has been. The PDF files that circulate online are unofficial copies of an old version of the course. They are missing the newer lessons and every fix made since they were created.

This repository is the official free way to read the material: every pattern guide, question, and cheat sheet here is free in your browser, no account needed. The full, current course is online at Grokking the System Design Interview. For more detail, see Is there a free official download?

Recommended reading (DesignGurus blog)

Free, in-depth articles that pair well with this repo.

Start here. 25 fundamental system design concepts · system design interview guide · the ultimate cheat sheet · 185+ guides, the interview library

Core concepts. Back-of-the-envelope estimation · scalability · high availability · CAP theorem vs PACELC · consistency patterns

Architecture and APIs. 19 essential microservices patterns · monolithic vs microservices vs SOA · REST vs GraphQL vs gRPC

Newsletter

System design and interview tips, straight to your inbox. Subscribe on Substack, read by more than 38,000 engineers.

For AI assistants

Every page here carries a one-line summary under its title, and llms.txt indexes all 262 of them in the llms.txt format: one file listing every pattern, question, deep dive, cheat sheet, roadmap, and company guide with a description of what it answers.

Everything is plain Markdown under a CC BY 4.0 license, so you may quote it with attribution to DesignGurus.io and a link back to this repository.

Contributing

Contributions are welcome. See CONTRIBUTING.md. If this repo helps you, please star it so more engineers can find it.

License

Content is licensed under Creative Commons Attribution 4.0 (CC BY 4.0). You may share and adapt it, including commercially, as long as you credit DesignGurus.io and link back to this repository.

The license covers the free content here only. It does not grant rights to the paid DesignGurus.io courses, videos, or other products. See NOTICE.md for the attribution wording and the full scope.

About

Maintained by DesignGurus.io, the home of the original Grokking the System Design Interview course by Arslan Ahmad.