Skip to main content

Claude/ChatGPT Prompt to Design an Instagram Feed (Fan-Out)

Design a social feed at scale: compare fan-out-on-write, on-read and hybrid, with celeb amplification, ranking, caching, and storage sizing.

Fill in the placeholders

Edit the values, then copy your finished prompt.

Your Prompt
prompt.txt

                                

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.

Frequently Asked Questions

Does it cover the difference between fan-out-on-write and fan-out-on-read?
Yes. Deliverable 1 compares fan-out-on-write, fan-out-on-read, and a hybrid push/pull model with the tradeoffs for your `[dau]`. This is the core of the design, since pure push dies on celebrities and pure pull dies on read latency.
How does it handle celebrities with huge follower counts?
It addresses write amplification for celebrities up to `[max_followers]` and specifies when to switch them from push to pull. That cutover threshold is the real design decision, so set the ceiling realistically because it determines where push becomes intolerable.
Does it include feed ranking, or just delivery?
Both. Deliverable 3 lays out the ranking pipeline as candidate generation, scoring, and re-ranking, separate from the delivery model. So you get how posts are chosen and ordered, not only how they reach a user's timeline.
What about brand-new users with no follows?
Cold start is deliverable 5. The design handles users with no follow graph, typically by falling back to popular or topical content. Confirming this exists matters because an empty feed makes a new account feel broken on first open.
Is this suitable for a system design interview?
Yes, the social feed fan-out problem is a canonical interview topic, and the deliverables match what reviewers probe. Ask the AI to fill the tradeoff table with concrete consequences like queue load and read fan-out cost so you can defend the choices under questioning.
Engr Mejba Ahmed

Need this built for real?

Engr Mejba Ahmed

AI Developer · Software Engineer

I'm Mejba — I design and ship production AI systems, automations, and full-stack apps. If you want this turned into a working solution for your team, let's talk.

More in System Design Prompts

Engr Mejba Ahmed

Engr Mejba Ahmed

Claude Code Expert · Online

👋

Hey there!

Quick Actions

WhatsApp Instant reply

Chat on WhatsApp

+880 1723 741224 · Instant reply

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

[email protected]

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support