Handle Celebrity Fan-out
Hard About 1 h Free with an account
One celebrity post creates millions of writes. Combine pushed timelines for ordinary authors with a pulled celebrity index at read time.
The brief
A celebrity with fifty million followers publishes once and the fan-out workers spend minutes writing fifty million timeline entries. Queue lag hides posts from ordinary users and cache churn evicts useful feeds.
Use a hybrid feed. Keep asynchronous fan-out for ordinary authors, but maintain a compact celebrity index that the Feed API merges at read time with each user's materialized timeline. The routing decision needs a fact: the author's follower count, read from the Social Graph at publish time. Small audience, fan out; huge audience, index.
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.
Related guides
What it practices
- Pub/sub fan-out
- Publish once to a topic and let independent consumers, timelines and channels fan out.
Do these first
Related katas
- Moderate and Index Posts Hard Pro Search indexes unreviewed content from an API dual write. Derive moderation and search asynchronously from committed posts.
- Operate the Social Feed Hard Pro Combine edge media, redundant APIs, hybrid fan-out, derived search, managed secrets, and end-to-end observability.
- Publish Order Events Reliably Hard Pro Orders commit but fulfillment events disappear. Relay a durable outbox into a topic and isolate downstream consumers.
- Fan Out Notification Channels Medium Pro One worker now contains email, SMS, and push logic. Publish once to a topic and fan out to independent channel consumers.