Design: News Feed Generation System
Design covers feed generation, storage, and retrieval. Does not cover user authentication or content moderation.
Functional Requirements
FR1: Users can follow other users and see their posts in a personalized feed
FR2: Feed should show posts sorted by recency and relevance
FR3: Support 10 million active users with 1 million new posts per day
FR4: Feed updates should appear within 5 seconds of new posts
FR5: Users can like and comment on posts
FR6: Support pagination and infinite scrolling in the feed
FR7: Allow filtering feed by topics or hashtags
Non-Functional Requirements
NFR1: System must handle 100,000 concurrent feed requests
NFR2: API response time for feed retrieval should be under 200ms (p99)
NFR3: System availability should be 99.9% uptime
NFR4: Data consistency for likes and comments must be strong
NFR5: Storage should be scalable for growing user and post data
