1 回答
- 最新
- 投票最多
- 评论最多
1
DynamoDB would not be my go-to for a leaderboard, as other better alternatives exist. But i'm assuming here that you want to use a single database (DynamoDB) for your entire application....
While your first access pattern is highly efficient, your second one may not be as scalable. Imagine 1M players played the game Meteor Blasters
and your rank is last place, you have to read 999,999 items to understand where you are in the list. That's going to be slow and expensive.
I would consider updating the users game rank on a daily basis for example, especially if they are not explicitly asking for it and its just used to populate a dashboard.
相关内容
- AWS 官方已更新 1 年前