Achieving High-Throughput for Specific Data Access Pattern

Large scale applications achieving high-throughput while storing a ton of randomly accessed data comes naturally to NoSQL databases such as Aerospike and DynamoDB because these databases are designed from the ground up to deliver just that. In this post, I have outlined a very effective and simple technique of accomplishing high-throughput for applications that have specific access patterns — ones which could lead to “hot” keys situation. For example, where there are only a handful of keys being accessed at a very high rate. Consider the following: Scenario: Voting application where there are two candidates — Candidate 1 and Candidate 2. For each candidate there needs to be a running total of number of votes being cast by 1000s of voters. Problem: All voting requests coming in through the application access the same keys and therefore hit the same data partition in order to increment their respective vote count. In other words, for each candidate if you use a single record with a running total that gets updated with every vote, it will be a “hot” key. Therefore, affecting throughput of the application wherein after a certain point, the request queue builds up to an extent where it has direct […]