HLD-204·Caching & Consistency
Medium · 1,000 ptsViral News Article Comment Thread Backend
Design a nested comment thread service for a global news publisher handling extreme read skew on breaking front-page stories.
Max p99
≤ 48 ms
Availability
≥ 99.5%
Budget
≤ $4,300
Functional Requirements
- FR-1GET /articles/{article_id}/comments — Fetches paginated top/recent comment tree.
- FR-2POST /articles/{article_id}/comments — Creates and publishes a user comment with immediate author visibility.
- FR-3PATCH & DELETE /articles/{article_id}/comments/{comment_id} — Edits or moderates/deletes comments and immediately invalidates cached threads.
- FR-4Must remain fast and available when backing storage suffers a 6x latency brownout.
Workload Profile
Baseline Traffic42,000 Read RPS / 2,800 Comment Write RPS
Breaking Story Peak130,000 Read RPS / 8,000 Write RPS
Active Working Set28 GB active front-page comment threads
Traffic DistributionHeavy Zipfian skew on top 0.1% article_id threads
Consistency Model
Read-after-write consistency required so commenters immediately see their posted replies (cache invalidation or write-through).
Solutions Locked
Sign in and either achieve AC or complete 3 official submissions on this question to inspect community diagrams and writeups.
Loading solutions...
Submission History (0)Select to replay
No submissions yet
Click Submit in the top bar to evaluate against all 7 judge cases and save each run here.
Design Write-up
0 boxes · 0 edges
0 words