Build a paginated feed that handles high-fan-out authors, fresh posts and visibility changes.
Backend and product engineers designing software behavior.
Your approach: Use diagrams, tables or prose for customer contracts, state transitions and data ownership; include APIs only to the depth the question requests.
Design a following-based news feed, starting with reverse chronological order. Follow publication through feed reads and pagination, including a high-fan-out author. Explain how deletion and privacy changes affect precomputed entries before discussing an optional ranked feed.
Declare p95 server latency for a page of 20 entries.
Required target: ≤ 300 milliseconds
Do not expose a deleted or unauthorized post solely because a feed entry was precomputed.
Explain duplicates and omissions when new posts arrive between page requests.
Define posts, follows, feed entries and cursors.
Show push, pull or hybrid responsibilities and high-fan-out handling.
Estimate feed-read QPS and fan-out work with explicit follow-count assumptions.
Trace a backlog and a privacy change, comparing latency, freshness and write amplification.