Learn system design by running it.
Lessons, a simulator and graded challenges, all in your browser.
Readyengine 2.0.0
- Sim clock
- —
- Served
- —
- Failed
- —
- Goodput
- —
§1Life of a request
One read, browser to database and back.
Scroll to trace user:42.
Browserbefore the data centre
Someone opens their profile
One read, GET /users/42. Scroll to send it.
DNSbefore the data centre
First, an address
The browser asks a resolver where the API lives.
CDN edgebefore the data centre
The edge cannot answer this one
A profile is personal, so the edge passes it on.
Load balancer151 µs
Pick a service
Round robin picks svc-1. 151 µs on the server so far.
Cache503 µs
Ask the cache first. Miss.
svc-1 asks the cache for user:42. Nobody has read it lately.
Database4.34 ms
The slow part
The read takes 3.63 ms. Five workers; extra reads queue.
Response4.9 ms
Fill the cache, then answer
svc-1 fills the cache and replies. 4.9 ms on the server.
The next read809 µs
A hit, 6× faster
Served from cache in 809 µs. The database never hears.
§2Five ways in
Each part stands alone.
§3Your first path: keep a database alive
Three steps, about an hour.
Inspection slip
cache-aside-recovery
Keep reads fast through a cache restart
| Check | Must be |
|---|---|
| Goodput | ≥ 99% |
| p99 latency of successes | ≤ 80 ms |
| No write takes effect twice | 0 violations |
| Monthly cost | ≤ $400 |