What a good answer looks like
Every problem, answered start to finish in the order you would say it out loud: requirements, lifecycle, numbers, design, tradeoffs, and the follow-ups that come after. Written for someone who has never seen one of these before.
Read-heavy / caching
Few people write. Many read, and they read the same few things.
Write-heavy / fan-out
One action by one person creates work for thousands of other people.
Follower timeline
coreA reader cannot tell when a post was supposed to appear in their feed. So you have seconds of slack on delivery, and almost none on opening the app.
Chat and messaging
coreTwo people are looking at the same screen expecting the message to appear. There is almost no slack on delivery. There is plenty on everything around it, and the design depends on using it.
Notification system
starterAlmost every notification has slack. This system's value is that it takes the work off other teams' request paths and spends that slack for them.
Matching under time pressure
Two sides need to find each other, and one of them is a human who is waiting.
Contested inventory
A fixed number of things and more people who want them than there are things.
Big files
The payload is far bigger than the metadata, and it should not go through your servers at all.
Live push
The server has to speak first, to a lot of people, at the same time.
Search and ranking
The user gives you a fragment and expects the right answer ranked first.
Limits and abuse
Deciding whether to say no, cheaply, on every request.
Location
Two dimensions pretending to be one, plus a very high write rate from things that move.
Data pipelines
Enormous volume in, aggregates out, and nobody is waiting for any single event.
Crawling and ingestion
The work is unbounded, the sources are hostile or fragile, and you are a guest on someone else's machine.
Sync and offline
The same data lives on several devices, all of which can be edited while disconnected.
Building the storage itself
You are not using a database. You are being asked to design one.
Money and correctness
Being fast is worthless if the number is wrong, and every mistake is somebody's actual money.
When you are ready to produce one instead of read one: the blank page and whiteboard →