Question regarding adaptive capacity reblanance

0

source

Quote: "If your application drives disproportionately high traffic to one or more items, adaptive capacity rebalances your partitions such that frequently accessed items don't reside on the same partition."

Is it correctly understood that if I have say two partitions (500 items in each) that each stores a series of say "forum-thread" items, if the items in the first partition are accessed more frequently than those in the the second one, then adaptive capacity will take some of the items from the first partition and put it over in the second partition to even it out? Meaning, if I query for all items in each of the two partitions, I might get say 450 in the first partition, and 550 back from the second partition. Is that correctly understood?

질문됨 2년 전198회 조회
1개 답변
3

Not quite. DynamoDB assigns items to partitions based on the hashed value of your Partition Key. If you drive a lot of traffic to an item collection/partition then Adaptive Capacity will split that partition into two. So if you have 2 partitions and one receives enough traffic so that its close to the partition limit of 1000WCU or 3000RCU then it will split into two, after which you will have 3 partitions.

profile pictureAWS
전문가
답변함 2년 전
  • Follow up question: What name is given to the newly created partition? (How do I find out what the name is?)

  • Partitions do not have names, they remain abstract to the end-user and are used solely to ensure the data is well distributed. What reason would you like to know a partitions name for? Perhaps you are confusing it with something else, please let me know how I can help.

  • Sorry, I mean, when you want to access the items in a partition you have to specify a key. So for this newly created partition, what key do I have to specify to access the items in this newly created partition? Are you saying that this partition is not directly accessible to the programmer? A new partition is created under-the-hood so-to-speak? If that's the case, then I wouldn't really say there is a limit of wcu and rcu from the point of view of the programmer.

  • You are correct, from a programmer perspective there is no need to understand the underlying infrastructure. There is literally no limit with DynamoDB in terms of WCU/RCU, you just need to ensure your access patterns are well distributed.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인