Hi! I have a use case where I’m receiving a lot of ids at a very high rate and updating an HLL (with MinHash) key in Aerospike, the problem is it’s causing hot key errors due to the incoming speed of the events.
Is it possible to know how the HLL (with MinHash) is stored in the byte array Aerospike returns so I can make HLL operations outside Aerospike? Do you provide any example implementation for this?
Since it sounds like you are planning to do some form of coalescing of these writes, have you already tried/considered coalescing by sending many keys to the HLL’s add API?
You can also write to many different HLLs stored on different records/keys. From there, you have a couple options to get the aggregate count:
You could read all the HLL objects and supply them to the get_union_count API.
You could periodically roll combine and store these HLLs to one of the keys using the set_union. Likely in such a use case, it would also be appropriate to use the refresh_count API to speed up subsequent calls for count to constant time.
Hi @kporter thank you so much for your reply!
dawdw
Since it sounds like you are planning to do some form of coalescing of these writes, have you already tried/considered coalescing by sending many keys to the HLL’s add API?
Yes, the issue is it’s so much data that I’m having trouble storing it all in RAM to send all the items to Aerospike at once