Grokking Redis
Vote

0% completed

​

5.2 Leaderboard Features and Sharding

A sorted set already gives a leaderboard its core operations: ZADD and ZINCRBY to score, ZREVRANK for a rank, and ZRANGE with REV for the top ten, each in O(log N) time. The previous lesson measured the cost of these operations, about 77 bytes per player, and packed a time tiebreaker into the score so that every score is unique.

Real products need more than one global ranking. This lesson builds the common features on the same board, lb:season42, and then shows how to partition a board that no longer fits on one node.

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content