The System Design Primer on GitHub is one of the most widely shared free resources for learning system design. This page does not replace it. It lists what the primer covers, section by section, and gives you a Codemia problem, lesson or course for each topic and each of its exercises, so you can practise a design and get feedback on it after you read.
The System Design Primer is one of the most widely shared free resources for learning system design. It's an open source repository on GitHub, by Donne Martin. It's organised by concept, and it starts with the first trade-offs. Performance and scalability, latency and throughput, availability and consistency.
Then it follows a request in. Domain name system, content delivery networks, load balancers, reverse proxies, and the application layer. Then data. Relational and NoSQL databases, caches, queues, and the protocols that connect them. It even ships with Anki flashcards for revision.
It also works through classic interview questions with solutions, like Pastebin, a Twitter timeline, and a web crawler. Codemia's companion maps all of it. 17 topics and 14 exercises, each linked to a lesson, a problem, or a course.
So read one section, then close it, and design the matching problem on a 45 minute timer. The AI reviewer points out what your design is missing. When the exercises feel easy, move on to full mock rounds. Find the map on codemia.io/system-design-primer.
Free
open source on GitHub17
topics mapped14
exercises mapped62
Codemia linksThe primer is an open source repository by Donne Martin. It gathers the ideas behind large systems into one long, well organised guide: the trade-offs that come first, then DNS, CDNs, load balancers, databases, caches, queues and protocols, then a set of interview questions with worked solutions. It ships with Anki flashcards for spaced revision and has been translated by its community into many languages.
People like it because it is free, it is organised by concept, and it links out to the original papers and engineering posts for depth. If you are new to system design, reading it end to end is a good start. Go to the repository on GitHub for the primer itself.
Its sections, in the order the primer takes them:
The primer's main sections in its order, by name. Next to each is where to practise or go deeper on Codemia. Lessons explain one idea with diagrams; problems open a workspace where you design the system and get AI feedback.
What it means for a system to scale, and why a fast system can still fail to scale.
How the two pull against each other, and which one a design should aim for.
CP and AP choices, plus PACELC, which covers the normal case with no partition.
Weak, eventual and strong consistency, and how quorums let you tune between them.
Fail-over, replication, and how availability adds up across components.
How a name becomes an address, and where caching sits on the way.
Push and pull CDNs, cache keys and invalidation at the edge.
Algorithms, health checks, and layer 4 against layer 7.
What a proxy in front of your servers does, and how it differs from a load balancer.
Splitting services, how they find and call each other.
Replication, federation, sharding, denormalization and query tuning.
Key-value, document, wide column and graph stores, and when to pick SQL instead.
Where caches sit, and cache-aside, write-through, write-behind and refresh-ahead.
Message queues, task queues and back pressure.
TCP, UDP, RPC and REST, and what each costs.
Authentication between users and services, and encryption in transit.
The reference tables, put to work in estimates that change a design.
The primer works through a handful of classic interview questions with its own solutions. Read its solution first, then close it and design the matching Codemia problem from scratch, out loud and on a timer. Where Codemia has no exact match, the note says so and points at the closest practice.
Short keys, storage for the paste, and read-heavy caching.
Fan-out on write against fan-out on read, and an index for search.
The URL frontier, politeness, duplicate detection and recrawl.
Pulling in transactions, categorizing them and running batch jobs over them. The closest Codemia practice is a batch pipeline and a personal finance agent.
Storing a huge graph across machines and searching paths through it.
A cache for query results: eviction, sharding and keeping it warm.
Counting events at scale and keeping top-k lists fresh.
Growing one server into a fleet: autoscaling, a managed database and a cache tier.
The primer also has a short set of object-oriented design questions. These come up in low level design rounds, and Codemia has a separate object-oriented design catalogue for them.
Buckets, collisions and resizing.
A hash map plus a doubly linked list, as a class design and as a coding problem.
No matching Codemia problem yet; the OOD course covers the same class modelling.
Modelling cards, decks and the games built on them.
The classic OOD question, plus a system design version.
Users, rooms and messages as classes, then the distributed version.
The primer is a reference, and it does what a reference should. It even includes a short outline of how to approach an interview question. A senior or staff interview grades a few things that are hard to learn from any reference, because they only improve with practice:
Knowing the steps is not the same as fitting requirements, a high level design, two deep dives and a wrap up into 45 minutes. The free System Design Interview Framework course drills that timing.
Interviewers score why you chose something, and what you gave up. Practise naming the alternative every time; the lesson on talking through trade-offs shows how.
The latency and powers-of-two tables are inputs. The skill is turning them into a decision, such as whether a dataset fits in memory. See estimation that changes the design.
Reading a model answer tells you what a good design looks like, not what yours is missing. On Codemia you submit your own design to a problem and the AI reviewer points out the gaps.
The last step is a full spoken round with follow-up questions. The AI mock interviewer runs one and grades it against a rubric.
Studying from Alex Xu's books as well? The chapter-by-chapter companion maps every chapter of both volumes to a Codemia problem.
Here is what a practice round looks like on Codemia, from picking a problem to the AI review:
A free, open source GitHub repository by Donne Martin, donnemartin/system-design-primer, that collects the building blocks of large-scale systems in one place: scalability, consistency and availability, DNS, CDNs, load balancers, databases, caches, queues and protocols. It also has worked interview questions with solutions and Anki flashcards for revision.
It is a strong base for the concepts. Most people also need to practise the interview itself: running a 45 minute design out loud, choosing what to go deep on, defending trade-offs and getting feedback on what they missed. That part needs practice problems and mock rounds, not more reading.
The fundamentals it covers have not changed much, and they are what most interviews still test. Newer topics such as stream processing, vector search or LLM serving are outside its scope, so add those from other material if your role needs them.
Reading it closely takes most people two to four weeks alongside a job. Working through the exercises and then practising each one as a timed design takes longer, and is where most of the interview benefit comes from.
They suit different stages. The primer is a free reference organised by concept. Alex Xu's System Design Interview books walk through one full design per chapter. Many people read the primer for the building blocks and use the books, or a set of practice problems, for full designs.
Each primer exercise has a matching problem on Codemia, listed on this page. You write or draw a design in the workspace and get AI feedback on it, then read the written editorial for that problem.
Start with the first primer exercise
Design a URL shortener, the Bit.ly half of the primer's first question. It is free on Codemia, with AI feedback on your design.