Is a composite key prone to hot partition?

Is a composite key prone to hot partition?

Let's say I have an items of

Item 1 - PK: userId1, SK: chatRoomId1
Item 2 - PK: userId1, SK: chatRoomId2

Now, I understand we have a 1k wcu/s hot partition limit. Modifying Item1, 1k times in a second would give us a hot partition issue. But what if we modify Item1 600 times, and Item2 600 times as well in a second.

Despite both items being in the same partition key but different sort key, would we still encounter hot partition issue?

Answer

DynamoDB can split partitions down to the size of a single item, so while you might have a hot partition initially because the two items shared the same partition key and started in the same partition, the database would adapt quickly.

Read more

Enjoyed this article?

Check out more content on our blog or follow us on social media.

Browse more articles