Whole systems / 3 / 4
Design a news feed
People post, and everyone who follows them should see it in their feed within seconds. We build the feed step by step: pull on read, push on write, the celebrity problem and a hybrid, ranking, media on a CDN, and what happens when the feed cache dies.
- 15 min
- Advanced
- 12 steps
- Feed load p99
- 80 ms
- Feed inserts
- 0 /s
- Time to reach followers
- 0 s
- request
- reply
- redelivery
- duplicate
- lost
Numbers are a model scenario, not measurements
The real request
Author's app → Feed APIRequest
POST /v1/posts HTTP/1.1
Host: api.example.com
Authorization1: hidden
{
"text": "First snow in the mountains",
"media_ids": 2["m_5521"]
}
Response
HTTP/1.1 201 Created
{
"post_id": 3"7393018847102976",
"created_at": "2026-11-18T09:12:04Z"
}
Authorization· hidden — Who is posting. A session token, hidden here.media_ids— Photos are uploaded separately first. The post only references them.post_id— 64-bit id that starts with the timestamp: sorting by id is sorting by time.
Course: 42 lessons
01 Foundations
02 Scaling
03 Data & storage
04 Communication
05 Reliability
06 Architecture
07 Security
08 Shipping
09 Whole systems
10 Business processes