I'm currently using DynamoDB for my project, but I'm hitting a limitation. There's a per-partition limit of 1000 writes per second in DynamoDB, and a small percentage of my customers need to perform balance updates that exceed this limit. I've heard that MemoryDB is like a persistent version of Redis. Is it a good choice for handling these high-throughput balance updates?
3 Answers
You might also consider breaking your counter into several buckets with DynamoDB's bucket hashed counters. When you increment the counter, you distribute the writes across different buckets, which helps with scaling. You can then sum the values from all buckets when you need the current count. There are quite a few resources out there that discuss this type of implementation!
One option you could explore is deepening your hash key, like using a structure such as partner:subaccount. This could help you create more partitions, which might improve your write performance. Just be sure you're not trying to overdo it on a single row.
Keep in mind that the 1k TPS limit you're facing is specific to partitions in DynamoDB. Each partition can only handle a fixed set of keys. So while bucket hashing can help, you'll need to shard your primary key and perform separate GET operations for each shard to really scale effectively.
Related Questions
Fix Not Being Able To Add New Categories With Intuitive Category Checklist For Wordpress
Get Real User IP Without Installing Cloudflare Apache Module
How to Get Total Line Count In Visual Studio 2013 Without Addons
Install and Configure PhpMyAdmin on Centos 7
How To Setup PostfixAdmin With Dovecot and Postfix Virtual Mailbox
Dovecot Error Unknown database driver mysql