Preparing your design workspace

Loading the problem and your latest saved attempt…

Design an Image Feed

Design a newest-first image feed with durable media delivery, stable cursors, and removal propagation.

Problem statement

For this exercise, assume you are designing a service that presents an authenticated reader with a newest-first feed of immutable image items. An authorized upstream source creates an image item with caption and publication timestamp or removes an existing item.

Readers request stable cursor-paginated metadata and receive durable media-delivery URLs; removed items must stop appearing and must not be returned from a stale feed cache.

Also assume 100 million retained items, average image size of 4 megabytes, 5,000 ingestions and 200,000 feed reads per second at peak, 20 items per page, p95 metadata response below 150 milliseconds, and 99% of accepted items visible within 10 seconds.

Exclude image editing, comments, advertising, and personalized or social-graph ranking.

What to build

  1. Create immutable image items through an authorized, idempotent ingest path and publish metadata only after the durable image is verified.
  2. Return a newest-first, cursor-paginated feed whose ordering remains deterministic through concurrent inserts.
  3. Serve image bytes through versioned object identities and caches while keeping metadata and media ownership aligned.
  4. Remove an item from new feed reads and media authorization within a bounded interval, including cached paths.

At scalePractice assumption

  • 100 million retained image items averaging 4 megabytes each.
  • 5,000 ingestions and 200,000 feed reads per second at peak with 20 items per page and p95 metadata response below 150 milliseconds.
  • 99% of accepted items become feed-visible within 10 seconds, while removals override stale feed and media caches through a bounded invalidation path.