90k/s
sorted page reads at the daily peak
130M daily users × 30 loads = 3.9B reads a day. Assume 300M votes a day too, 7,000 a second at peak.
Where does the sorting happen?
Bad: Sort on every read
90k sorts a second over scores that keep changing.
Good: Sort once per change
Each community’s top 1,000 per sort lives in Redis. A page reads 25 IDs.
Reddit’s hot score never looks at the clock
Log of net votes plus submission time ÷ 45,000 s, so 12.5 hours of newness is worth 10× the votes. Rank moves only when a vote lands.
100 → 1
row writes a second for a viral post
Your vote is one row keyed by user and item, shown at once. Workers sum each item’s votes per second, so totals lag seconds.
A post hits a 40-million-member community. Copy it into 40 million feeds?
The trick
Members share one ranked list, so your feed merges the hot lists of up to 50 joined communities.
One upvote, no downvotes. Why does it rank last?
Net score favours early comments, and share lets one vote win. Rank by the Wilson lower bound of the upvote share, and 10 up, 1 down wins.
200,000 fans on one match thread
- Logged out: the CDN caches each page 5 s
- Logged in: one shared body, cached 2 s
- One rebuild per server; the rest serve stale
- Overlay only your own votes
Remember
No request sorts or counts. A clock-free hot score lets workers keep listings sorted from batched votes. Comments rank by the Wilson bound, feeds merge shared lists, and viral threads come from cache.