HLDArena
HLD-315·Messaging & Fan-out
Hard · 1,500 pts

Short-Video Multi-Stage Recall, Watch-Signal & Feed Ranker

Design TikTok / Reels’ "For You" candidate retrieval and real-time watch/skip feature pipeline updating user interest embeddings within seconds.

Max p99
≤ 62 ms
Availability
≥ 99.5%
Budget
≤ $8,900

Functional Requirements

  • FR-1GET /fyp/{user_id} — Runs low-latency candidate recall + ranking excluding already-watched video_ids.
  • FR-2POST /fyp/{user_id}/signals — Streams watch-duration, completion, and skip events into feature store.
  • FR-3PATCH & DELETE /fyp/{user_id} — Updates, cancels, or deletes user_id records and immediately invalidates or updates cached state (read-after-write).
  • FR-4Must guarantee already-watched videos do not repeat (read-after-write bloom/history) under 65ms p99.

Workload Profile

Baseline Swipes58,000 Feed Read RPS / 14,000 Watch Signal RPS
Prime-Time Evening Peak150,000 Read RPS / 32,000 Signal Write RPS
Active Working Set42 GB user seen-video bloom filters & item embeddings
Traffic DistributionHeavy hot-item skew on trending viral audio/video candidates

Consistency Model

Read-after-write seen-filter updates per user_id so swiped videos are never served twice in the same session.

Relevant practice for

Click an item in Inventory above, or press B to add a component, double-click to name, C to connect.

Design Write-up

Write under ### Architecture for Diagram to take that up directly

Compulsory section · if not written yet, Diagram reads from the start of your write-up.
Architecture: required·FRs mentioned: 0/4·0 boxes · 0 edges
0 words
Hidden Cases #4–#7 run automatically on Submit
Case 1: Smoke & API ContractInput Workload
Read RPS
2,000 rps
Write RPS
400 rps
Key Distribution
Uniform (Low Skew)
Chaos Fault
None (Healthy Cluster)
Expected Pass CriteriaASSERTIONS
• Tail Latency: p99 ≤ 124 ms
• Availability: ≥ 99.5%
Valid end-to-end Client → Compute → Storage topology