Menu

1 / 7

Design Instagram's feed: system design in 5 steps

DEV Community: redis·System Design Simple·3 days ago
#lPtjfINo
#devtoredis#devto#dev#feed#reads
Reading 0:00
15s threshold

A home feed must return the newest posts from every account a user follows, in time order, within a latency budget, while reads outnumber posts by about a hundred to one. The design question is where the work of merging those posts happens: on every read, on every write, or split between the two, and what each choice costs in operations, memory and tail latency. Interview question: "Design the home feed of a photo app for 100 million daily users."

Prerequisites

Requests per second and peak load. Capacity is planned for the busiest second: divide a daily count by 86,400, then multiply by a stated peak factor, as in the ticket sale spike that separates performance from scalability .

Big-O cost. O(log N) means the work grows with the logarithm of the input size: doubling N adds one step. It says how cost scales, not how long it takes.

Binary heap. An array kept as a tree where each parent is no larger than its children.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.