System Design · Senior · Question 8 of 75
How does fan-out on write differ from fan-out on read in a social feed?
- ✓Correct answer: On write, a post is copied into followers' feeds; on read, the feed is assembled on the fly
- 2On write, a post is sent only to the author; on read, to all users
- 3They're the same thing; only the terminology differs
Explanation
Precomputed feeds make reads fast, but a celebrity's post with millions of followers generates millions of writes. Assembling on read is cheap to write but slow to read. Usually it's a hybrid: fan-out on write for regular authors, merge-in at read time for celebrities.