Reputation: 21
My DynamoDb table has 3000 rcu and 1000 wcu, the data size is well below 10 GB. Based on the formula to calculate partitions, 2 partitions will be created. I don't understand why 2 partitions are created but not one ?? Since the required rcu and wcu can be handled by one partition. Please anyone explain.
I tried to find an answer online, but so far I've got nothing
Upvotes: 0
Views: 177
Reputation: 55720
It used to be that the number of partitions was determined by the formula #partitions = (wcu + rcu / 3) / 1000
(the 1000 WCU limit and the 3000 RCU limit are mutually exclusive). Based on this formula, plugging your numbers you get: #partitions = (1000 + 3000 / 3) / 1000 = 2000 / 2 = 2
That being said, DynamoDB has released many improvements to partitioning and rate limiting since the early days (pre 2018/2019) which may affect the above. For example: https://aws.amazon.com/blogs/database/how-amazon-dynamodb-adaptive-capacity-accommodates-uneven-data-access-patterns-or-why-what-you-know-about-dynamodb-might-be-outdated/
How did you determine that your table has 2 partitions? This is not something that is exposed directly. And in fact your table might even have more than two partitions, based on how it was configured and how provisioned capacity has changed over time.
Upvotes: 1
Reputation: 7122
Sometimes you get a bit more than the bare minimum you need.
Partitions and their capabilities are an internal detail, and how many you get for different throughput specifications is subject to change. What’s required is that you get access to the throughput you’re requesting. You are.
Consider it the Bakers Dozen of DynamoDB.
Upvotes: 1