What Is Split For Heat In DynamoDB?
Uriel Bitton
AWS Cloud Engineer | The DynamoDB guy | AWS Certified & AWS Community Builder | I help you build scalable DynamoDB databases ????
It is well known that Amazon DynamoDB adapts to workloads of any scale while offering consistent performance.
But a lesser-known concept with its adaptive capacity features is “split for heat”.
To understand what “split for heat” is we must first understand the reason behind it.
In DynamoDB, your data is written to partitions on AWS’s storage servers.
While a partition has a physical size limit, you as a customer, are not concerned with that nor will it affect you in any way. This is because DynamoDB will automatically manage partitions for you, creating new ones as your dataset grows.
However, even though size limits is not an issue, hot partitions surely is one.
A hot partition is a partition that is consistently receiving high traffic. This can impact read and write performance to and from that partition (when reading or writing items stored with that partition key).
The standard prevention for a hot partition is high partition key cardinality.
But a hot partition can still occur when you have an overly popular partition.
This is where DynamoDB applies a strategy called “split for heat”.
What is Split For?Heat?
Split for heat is a mechanism where DynamoDB detects a partition that is receiving high traffic and automatically splits it into two smaller partitions.
This helps reduce throttling and alleviates the performance impacts of reads and writes to that partition as you now have double the throughput available for that data (since it’s split into two).
This is better than traditional sharding as it requires no manual intervention. DynamoDB will also determine when it is best to split it based on usage patterns.
When splitting a partition, DynamoDB will distribute the items based on their sort key. This effectively doubles the available read and write throughput.
How Does Split For Heat?Work?
Best Practices to maximize the benefits of Split For?Heat
Some best practices and design considerations:
Conclusion
Split for heat is one of DynamoDB’s most valuable features for managing unpredictable traffic use cases.
While proper data modeling is crucial to prevent hot partitions, DynamoDB’s adaptive capacity features like split for heat make sure that even the highest traffic workloads don’t impact your system’s performance.
?? My name is Uriel Bitton and I hope you learned something in this edition of Excelling With DynamoDB.
?? You can share the article with your network to help others learn as well.
?? If you're looking for help with DynamoDB, let's have a quick chat here.
?? I hope to see you in the next week's edition!