A game needs frequent score updates, top-player lists, and each player's current rank with submillisecond data access. The leaderboard can be rebuilt from a durable event store; which solution best fits these requirements?
Show the answer
Correct answerD. An Amazon ElastiCache for Valkey sorted set
AWhy not this: A score index supports ordered queries, but determining an arbitrary player's rank requires additional work.
BWhy not this: PostgreSQL can calculate rankings, but is less suited to this submillisecond, rebuildable leaderboard workload.
CWhy not this: Updating an S3 object requires replacing its contents and does not provide native rank operations.
DWhy this is right: Sorted sets provide native score updates, rank lookups, and ordered ranges with in-memory access.
ElastiCache for Valkey sorted sets provide in-memory score updates, ordered retrieval, and rank operations. A DynamoDB score index can support ordered queries, but does not provide a native operation to retrieve a member's rank.