What this prompt does
This prompt makes the AI design an Instagram-like social feed at scale, specified tightly enough to defend in a design review. You set the [dau], the [max_followers] celebrity ceiling, and the [latency] target. It returns a comparison of fan-out-on-write, fan-out-on-read, and a hybrid model with tradeoffs; celebrity write-amplification handling and when to switch them to pull; the ranking pipeline; caching and the read path; cold-start handling for new users; and storage sizing for the timeline store, media metadata, and fan-out queues.
The structure works because fan-out is the canonical "it depends" problem: pure push dies on celebrities, pure pull dies on read latency. Forcing an explicit hybrid cutover threshold turns the vague tradeoff into the actual design decision. [dau] scales the fan-out comparison and storage math, [max_followers] sets where write amplification forces a switch to pull, and [latency] constrains the caching layers and read path.
When to use it
- You're prepping a system design interview and want the fan-out problem cold.
- You're scoping a real feed and need a defensible push-versus-pull decision.
- You need to reason explicitly about the celebrity cutover threshold.
- You want a ranking pipeline broken into candidate generation, scoring, and re-ranking.
- You need cold-start handling for users with no follow graph yet.
- You want storage sizing for timelines, media metadata, and fan-out queues.
Example output
You get a written design with a request-flow diagram (ASCII is fine) and a table of fan-out tradeoffs: a comparison of fan-out-on-write, fan-out-on-read, and a hybrid push/pull model with tradeoffs for [dau]; handling of write amplification for celebrities up to [max_followers], including when to switch them to pull; the feed ranking pipeline covering candidate generation, scoring, and re-ranking; caching layers and the read path that hits [latency], plus read-your-writes consistency; cold-start handling for brand-new users; and storage sizing for the timeline store, media metadata, and fan-out queues.
Pro tips
- Reason about the hybrid cutover threshold explicitly — the follower count at which you switch a user from push to pull is the actual design, not a footnote.
- Set
[max_followers]to a realistic ceiling, since it directly determines where write amplification becomes intolerable and pull takes over. - Use a real
[dau]because it scales the fan-out comparison and the storage sizing; a vague number gives a vague design. - Treat
[latency]as a hard read-path budget and ask the AI to show which caching layers get it there. - Don't skip cold start; a feed that's empty for new users feels broken, so confirm the design has a fallback like popular or topical content.
- For review prep, ask the AI to fill the tradeoff table with concrete consequences (queue load, read fan-out cost) rather than generic pros and cons.