Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way to model millions of exist checks in Aerospike?

Having grown out of Redis for some data structures I'm looking to other solutions with good disk/SSD performance. I recently discovered Aerospike which seems to excel in an SSD environment.

One of the most memory hungry structures are about 100.000 Redis sets, which can each contain up to 10.000 strings. Each string is between 10 and 30 characters.

These sets are mostly used for exists / uniqueness checks.

What would be the best way to model these? I generally see 2 options: * model a redis set as an Aerospike lset * model each value in a set separately.

Besides this choice, the 100.000 Redis sets are used as a partitioning on the keys. For reasons of locality it would probably make sense to have a similar sort of partitioning/namespacing in Aerospike. However, I'm pretty sure the notion of 'namespacing' in Aerospike isn't used for this sort of key partitioning. What would be a correct way (if any) to do this in Aerospike, or is that not needed?

like image 833
Geert-Jan Avatar asked Dec 20 '22 10:12

Geert-Jan


1 Answers

Aerospike does its own partitioning for load balancing and high availability needs. Namespace is synonymous to Database in traditional sense and NOT to Partition of data. Data in a Namespace is partitioned and stored in cluster. You as a user need not worry about placement of the data.

I would map a Redis set to Aerospike "lset" (one to one). Aerospike should takes care of data locality for the data in a given "lset".

like image 63
DB Guy Avatar answered Jan 10 '23 19:01

DB Guy