Asked about Working through the classic designs
Fan-out on write or fan-out on read for a news feed?
An answer that works
Both. Fan-out on write makes reads fast at the cost of expensive writes, which fails for accounts with millions of followers. Those use fan-out on read. The hybrid is the standard answer.
Reading an answer is not being able to give one. The section that teaches this is Working through the classic designs, 4 hours of Distributed systems.
Learn this properlyAlso asked about Distributed systems
How would you scale a read-heavy service?What is a cache stampede and how do you prevent it?Why do queue handlers need to be idempotent?Explain eventual consistency.How would you design a rate limiter?Estimate the storage needed for a year of chat history for 10 million daily users.Your service calls eight internal dependencies. Each promises 99.9 per cent. What can you promise?How do you make a payment operation safe to retry?