Estimation
Which number changes the design
Before you start
- Open lesson
Estimation
That lesson converts product numbers into per-second rates and storage.
Why it matters
A feed average can look safe while one account creates a burst large enough to delay everyone else. Fifty million daily readers, 200 followees each, and one weekly post per user describe ordinary traffic; the account with 20 million followers describes the tail. The estimate must identify which of peak home reads, steady fanout, or one celebrity post forces a different path.
Example
Size a feed fanout
50 million users open home once a day. A typical user follows 200 accounts and posts once a week. One celebrity has 20 million followers.
- Input
- users = 50_000_000, follows = 200, posts_per_week = 1, celebrity_followers = 20_000_000
- Output
- [579, 1157, 16534, 20000000]
Mental model
The idea
Keep one example in view
Size a feed fanout
users = 50_000_000, follows = 200, posts_per_week = 1, celebrity_followers = 20_000_000→[579, 1157, 16534, 20000000]
Keep this exact scenario and its constraint in view while you build the model.
For 50 million users, 200 followees, one weekly post, and a 20-million-follower celebrity, compare 1,157 peak home reads/s, 16,534 ordinary fanout writes/s, and the celebrity’s 20 million writes as separate loads.
Spread 50 million home opens over 86,400 seconds to get about 579 reads per second, then use 2× for a 1,157-read peak. Fifty million weekly posts become about 83 posts per second; at 200 followers each, ordinary fanout is about 16,534 timeline writes per second.
Keep the celebrity outside that average. Its single post creates 20 million target writes, more than 1,000 seconds of ordinary fanout arriving at once. A queue can smooth normal variation, but hiding this burst inside the mean would understate how long followers wait.
Pro
The rest of this is on Pro
The idea above is free. The walkthrough, the cost, and the practice are on Pro.