Updates in aerospike



How updating the keys works?

When you update the key does it occupy the extra space in memory or use the existing space? i mean we are planning to update the 10 million records every 5 minutes, trying to estimate the size of memory keys are going to use, does the total used memory would be 1.19GB?

And what kind of issues we would face while updating 10 million keys every 5 minutes? since we are updating a key every 5 minutes would we face the hot key problem?



A hot-key update is if you are updating a key from multiple clients i.e. while the first update has not finished from client1, an update to the same key comes from client2 (and gets parked in the pending-transactions for this key(digest) in the rwHash, waiting to execute). So if you are updating a key every five minutes, and write latency is typically one to few milliseconds, you won’t face a hot-key problem.

If your userkey, setname and namespace is not changing, for the same key, regardless of how many times or often you update the data associated with the key, the memory occupied by the Primary Index for that key will re-used - i.e. not grow.


Thanks Piyush!


Just a minor correction on hot-key - when I say update from multiple clients, it can also be different threads of the same “client”, in a multi-threaded application, each thread trying to update the same key (record).