System design · Cases — three designs, worked end to end

Design a news feed

One question decides this design — does the poster pay to deliver, or does the reader pay to assemble? This works the cost model in numbers, shows why every real feed is a hybrid, implements the k-way merge the read path needs, and handles the celebrity problem, ranking, and pagination that does not skip posts.

28 min read Full lesson in the app Patterns: fan-out-on-write, fan-out-on-read, k-way-merge

What you'll be able to do

Before this: queues-and-backpressure, caching-and-stampedes

The rest of this lesson is in the app

One question decides this design — does the poster pay to deliver, or does the reader pay to assemble? This works the cost model in numbers, shows why every real feed is a hybrid, implements the k-way merge the read path needs, and handles the celebrity problem, ranking, and pagination that does not skip posts. This walkthrough runs about 28 minutes, with runnable code you can edit and re-run as you read.

Continue in ChannelPulse

The first module of every track is free to read on the web — see what's open in System design.