Leaderboard & Counting Service · View 15 of 21 · Runtime
Decisions
- Only the member's own rank gets freshness spent on it. Top-N, the neighbourhood and the closed standing are all read at a pinned version with no overlay.
- Rank outside the materialised head is answered from a value histogram, which makes it constant-time and approximate. An exact rank for a member at position 41,208 of 10 million is a count-less-than query nobody is willing to pay for at 120,000 reads a second.
- A closed standing is read by season id, never by projection version, which is what makes it immune to a projection rebuild.
The degraded path is a product decision
- When the budget cannot be met, the platform answers with a percentile instead of a rank and says so in the response. The alternative — exceeding the latency budget to be exact — fails the screen.
- Opted-out members are excluded in the neighbourhood path, so a privacy choice does not depend on the caller remembering to filter.
Risks
- A percentile where a member expected a number is a product regression even when it is architecturally correct. The degradation needs a designed presentation, not just a flag.
- Histogram bucket width sets the accuracy of every non-head rank in the system and is a single global tuning parameter it would be easy to set once and forget.