DynamoDB Partition Key Strategies for SaaS

Amazon DynamoDB is a fully managed NoSQL database service built for scalability and high performance. It’s one of the most popular databases used at SaaS companies.. We selected DynamoDB for the same reasons as everyone else: autoscaling, low cost, zero downtime. However, at scale, DynamoDB can present serious performance issues.

SaaS applications commonly follow a multi-tenant architecture, which means every customer receives a single instance of the software. At scale, this can often lead to hotkey problems due to an uneven partitioning of data in Amazon DynamoDB, which can be resolved with two solutions that will allow the system to scale. When using Amazon DynamoDB for a multi-tenant solution, you need to know how to effectively partition the tenant data in order to prevent performance bottlenecks as the application scales over time.