Preparing your design workspace

Loading the problem and your latest saved attempt…

Social Post Comments

Design the storage and serving path for comments attached to social posts.

Problem statement

For this exercise, assume the source-backed system identity and the explicitly bounded practice contract that follow. Design a comments subsystem for social posts.

A user can add a comment, read a stable page of comments for a post, and remove their own comment; the system must enforce post visibility and author permissions. Reply depth, ordering policy, traffic, and retention are intentionally open interview inputs.

State bounded assumptions, and keep the design focused on comment ownership, pagination, and concurrent updates rather than the rest of the social network.

What to build

  1. Create a comment on a visible post with an idempotent outcome for client retries.
  2. Read a stable, cursor-paginated comment view under a declared ordering policy.
  3. Let an authorized actor remove a comment without corrupting pagination or reply references.
  4. Prevent comment reads and writes when the caller cannot access the parent post.

At scaleExercise boundary

  • Traffic, retention, reply depth, and the fraction of unusually popular posts are intentionally unspecified; choose bounded assumptions.
  • Many users may comment on the same popular post concurrently.
  • Removal and visibility changes must have defined effects on cached pages and cursors.