How grading works
What the simulator measures, how code is graded, and how we check that the grading itself is right.
DesignTheSystem is a place to practise. It doesn't replace the courses and books where you learn the ideas; it is where you find out whether you can use them. So the grading has to be something you can trust. Here is exactly how it works, including what it leaves out.
System design: the simulator
Every problem has a traffic profile: a peak rate of requests per second, the share of them that are reads, and a spike on top of the peak. Your design gets a 60-second run of that traffic. Each component you place has a capacity (reads and writes it can serve per second), a time per request when it is idle, and a monthly price. As a component gets busier, requests queue and latency climbs; past its capacity, requests time out and fail.
A run passes when all of these hold at once:
- p99 latency is at or under the problem's target.
- Availability (the share of requests answered) is at or above the target. Writes a queue accepted but never stored count as failures too.
- Monthly cost is within the budget.
- Stale reads stay under the limit, for problems that set one (payments, bookings and other money paths).
Beyond pass or fail, the result names the busiest component, shows each component's load, and lists design checks an interviewer would expect for that kind of system, such as a cache for read-heavy traffic. Those checks count toward your grade, not toward passing.
Where the numbers come from
Capacities, latencies and prices are round teaching values, close enough to real hardware that the trade-offs come out the right way round: memory is far faster than a database, a database takes fewer writes than reads, a single hot row can take only so many updates a second. They are not a benchmark of any particular cloud provider, and your production numbers will differ. Every component's numbers are shown on its info card, so nothing is hidden.
What it does not model
The simulator models load, queueing, caching, replication, partitioning and queues, and lets you inject faults: a server crashing, a database primary failing, a cache being flushed and a whole zone going down. It does not run your queries, model network partitions between regions, or account for things like garbage collection pauses or a bad deploy. Use it to see how a shape of system behaves under load, then reason about the rest the way you would in an interview.
Code design: tests, not opinions
Code design problems give you an interface to implement in TypeScript. Your code runs in a sandbox with no access to the network or the machine. A problem is passed when every test passes: the public tests you can see, hidden tests for edge cases, and then a change request that adds a new requirement.
On top of pass or fail, you get a grade out of 100:
- Tests, 50 points. Core behaviour counts double.
- Change request, 20 points. Passing its tests, and how many existing classes you had to edit to get there. Adding a class costs nothing.
- Design structure, 15 points. Checks such as small methods, private state and no long switch on a type, plus a few specific to each problem. They accept different valid names and styles, not one expected answer.
- Review, 15 points. An AI review against a fixed rubric: one clear job per class, room for new requirements, hidden state, clear names and handled edge cases. It explains and adds points; it never decides pass or fail.
How we check the grading
A grader that marks good answers wrong is worse than none, so the grading itself is covered by automated tests that run on every change to the site:
- Every system design problem has a reference design that the simulator passes, within budget.
- Common mistakes, such as a queue with nothing reading from it or a store that can't keep up with the writes behind it, are tested to fail with a clear reason.
- Every number a problem statement quotes (traffic, read share, latency target, availability, budget) is checked against the numbers it is graded on.
- Every code design problem has a reference answer that passes all its tests, its change request and its design checks, and every starting skeleton fails.
- Design checks are tested against alternative valid designs, so a different class name or syntax isn't marked wrong.
- Lessons that ask you to try something in the simulator were written from real runs, and tests stop them mentioning settings the simulator doesn't have.
If you think something is graded wrong, it is a bug, and I want to know: report it or email creator@designthesystem.dev.
Where to learn the ideas
These are the resources I'd recommend for learning the theory. DesignTheSystem is not affiliated with any of them; they are simply good.
Hello Interview
Clear write-ups of the core concepts and of common interview problems, from people who run these interviews.
ByteByteGo
Alex Xu's visual guides and newsletter on how real systems are put together.
Designing Data-Intensive Applications
Martin Kleppmann's book on storage, replication and consistency: the reasons behind the trade-offs.
The System Design Primer
A free, open-source collection of system design topics, with exercises.