
π System Design Interview Classics Β· Data Flow
How posts reach followers' feeds: fan-out on write for normal users, fan-out on read for celebrities, and a ranked feed built from a cache.
Opening a template is free and never counts toward your daily diagrams. Asking the AI to change it counts as one.
Drawing diagramβ¦
Data flow for a social feed: a post is saved in the post store and sent to a fan-out service. For users with fewer than 10,000 followers the fan-out service writes the post ID into each follower's feed cache in Redis. For celebrities it does nothing at write time. When a user opens the app, the feed service reads their cached feed, merges recent posts from celebrities they follow, ranks them, and hydrates post details from the post store. Number the processes and label every flow.
flowchart LR
subgraph EXT ["External entities"]
author["Author"]
reader["Reader"]
end
subgraph PROC ["Processes"]
p1("1.0 Create and Store Post")
p2("2.0 Fan-out Post to Followers")
p3("3.0 Fetch and Rank Feed")
p4("4.0 Hydrate Post Details")
end
subgraph STORE ["Data stores"]
d1[("D1 Post Store")]
d2[("D2 Redis Feed Cache")]
d3[("D3 Follow Graph Store")]
end
author -->|"Post content and Metadata"| p1
p1 -->|"Saved Post Data"| d1
p1 -->|"Post ID and Author ID"| p2
p2 -->|"Author ID query"| d3
d3 -->|"Follower IDs and Follower Count"| p2
p2 -->|"Post ID"| d2
reader -->|"Feed Request and Reader User ID"| p3
p3 -->|"Reader User ID"| d3
d3 -->|"List of Followed Celebrity IDs"| p3
d2 -->|"Cached Post IDs"| p3
p3 -->|"Celebrity User IDs"| d1
d1 -->|"Recent Celebrity Post IDs"| p3
p3 -->|"Merged and Ranked Post IDs"| p4
d1 -->|"Full Post Content and Details"| p4
p4 -->|"Hydrated Social Feed Data"| readerA data flow diagram with 6 processes and outside parties, 3 data stores and 15 data flows.
Describe your own system in plain English and CloudSketch AI draws it in seconds. See all AI diagram generators.
The classic interview design for a service like bit.ly: short code generation, fast redirects from a cache, and click analytics processed separately.
How a one-to-one chat message is delivered in a WhatsApp-style system, with sent, delivered and read ticks, and push notifications when the receiver is offline.
The core of a ride-hailing app: drivers stream their locations, a geo index finds nearby drivers, and a matching service offers the trip to the best one.
How a token bucket rate limiter decides whether to let an API request through, using Redis so all servers share the same counts.
A notification system that sends email, SMS and push messages at scale: one API, a queue per channel, user preferences, and retries.
How search suggestions appear as you type: a prefix index built offline from past searches, served from memory, and refreshed regularly.