Skip to content
Katabench
Try free

Fan Out Home Timelines

Medium About 45 min Free with an account

Reading every followed author on demand is collapsing the database. Publish post events and materialize timelines asynchronously.

The brief

The home feed queries recent posts for every followed account, merges them, and sorts on every refresh. As follow counts grow, one page view becomes hundreds of database reads.

Keep the post store authoritative, but publish new posts to a topic and let redundant fan-out workers materialize follower timelines in a cache. Fan-out has a second data dependency the naive design hides: who follows the author. Those relationships live in their own Social Graph store, which every worker reads to expand an author into follower timeline keys. A Feed API should read the cached projection rather than recomputing every request.

Drag components from the palette, wire them together, then Check your design. Prefer to be guided step by step? The first hint holds the guided plan.

The topology is deliberately bounded. Choose the responsibility and interaction pattern, not a cloud vendor or product SKU.

How it is graded

You build the design on a canvas, and Katabench checks the topology against the challenge's design rules.

System Design Studio →

Related guides

What it practices

Pub/sub fan-out
Publish once to a topic and let independent consumers, timelines and channels fan out.
Caching
Put a cache in front of hot reads and decide what stays fresh.

Do these first

Related katas