Problem
Design a per-post comment ranking system that orders top-level comments and nested replies by relevance while scaling to large threads and bursty vote traffic
- Reads must serve precomputed rankings in single-digit milliseconds, requiring all feature aggregation and model inference to run asynchronously
- Training labels inherit position bias from the current order, creating a feedback loop that entrenches early comments and degrades fairness for new ones
- Global re-sorting on every vote explodes write costs and loses hierarchy, necessitating incremental updates bounded to individual child lists
Key Test Points
- Ordered child lists
- Exposure-aware labeling
- Asynchronous incremental ranker
Spot an issue or have a suggestion?