简体   繁体   中英

Dynamically add shards to DynamoDB and remap old data

I know that dynamoDB supports shards. I wanted to know that is it possible to add shards dynamically. Suppose I provisioned 4 shards and shardkey would be customerID.

  • Now in the future I want to provision 6 more shards, is it possible to add it?
  • Suppose if we can add 6 more shards how will the old data gets remapped to new shards and will the availability or consistency take hit?

For remapping my guess is that they must using consistent hashing.

No, There is no way to provision partitions as many as you want manually.

The number of Dynamodb partition is decided by specific criteria.

This is the criteria.

  1. Partitions by capacity = (RCUs/3000) + (WCUs/1000)
    • It is depending on how many capacity you provision to the table.
  2. Partitions by size = TableSizeInGB/10
    • It is depending on how far the table size is.

Total Partitions = Take the largest of your Partitions by capacity and Partitions by size and round this up to an integer.

For more information, I recommend you read the post .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM