The big idea
What happens when you open Twitter?
You follow hundreds of accounts. The instant you open the app, you want a feed of their latest posts — newest and most relevant first — in well under a second.
Naively, you’d ask the database for the latest tweets from everyone you follow and merge them on the spot. That works for ten followers and collapses for three hundred million users. The whole art of a feed is deciding when to do that merge: at read time, or ahead of time.
How to read this: Each step opens with a real design decision — you make the call before I show you what ships. Watch the diagram grow, and at the end stall the fan-out to see why posting and delivery are decoupled. Hit Begin.