Design Facebook post feed
Asked in the product architecture stage. Discuss the entities and APIs needed to assemble a feed, including pagination, localization, and support for different post content types.
Requirements
- Return a user's feed with posts from relevant friends and followed pages.
- Support text, image, video, shared, and link posts through a common representation.
- Provide stable cursor pagination and enforce visibility and authorization rules.
- Support locale-aware text, timestamps, and formatting.
- Explain storage, caching, freshness, and behavior when dependencies fail.
Constraints
- Facebook's existing identity and authorization systems are available.
- Media is stored and delivered through existing Facebook media infrastructure.
- The feed must remain usable when some post or profile data is unavailable.