bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/System Design/Design a News Feed
System Design•Design a News Feed

Design a News Feed: High-Level Architecture

Design a home timeline (Twitter/Instagram style) that shows recent posts from accounts a user follows.

How to approach it

Sketch the request path from the client inward: client → edge/CDN → load balancer → stateless services → cache → database, with queues and workers off to the side for async work. Keep services stateless so they scale horizontally. Draw the happy path first; resilience and scale come after.

Components

ComponentRole
Clientapp
Load Balancerroute requests
Post Servicewrite posts
Fan-out Workerpush posts to follower timelines
Queuefan-out jobs
Timeline Cacheprecomputed per-user feed (Redis)
Feed Serviceread timeline, merge celebrity posts
Post Storedurable posts, sharded by author

Request path

Client → Load Balancer → Feed Service → Timeline Cache → Post Store

Previous

Design a News Feed: API & Data Model

Next

Design a News Feed: Scaling