What are the prerequisites for using Redis for Aerospike?

We are currently using Redis and it is a great in-memory data store. We are starting to look at some new issues where memory constraint is a factor and are considering another option. One that we ran into - Aerospike - seems to be very fast, even faster than redis on a single shard in memory operation.

Now that we add this to our stack, I'm trying to understand the use cases where Aerospike won't be able to replace redis?

+3


source to share


4 answers


Aerospike supports fewer datatypes than Redis, for example pub / sub is not available in Aerospike. However, Aerospike is a distributed key store and has excellent clustering features.



Both are great databases. It depends on how large the dataset you are processing and your expectations for growth.

+5


source


Redis:

Key / value store, dataset fits into RAM on one computer or you can wrap yourself on multiple machines (and / or cores with single threaded), save data to disk, have data structures like lists / sets, base pub / sub, simple slave replication, Lua scripting.

Aerospike:

Key / value row-store (value contains cells with values, and these values ​​can be larger than maps / lists / values ​​to have multiple levels), multithreading to use all cores, built for clustering on replicated machines, and can do replication cross-domain data centers, Lua scripting for UDF. It can run directly on an SSD, so you can store a lot more data without plugging it into RAM.



Comparison:

If you only have a small dataset, or is good at single core performance, Redis works great. Quick setup, easy to use, easy to easily connect a slave with 1 command if you need more readable scalability. Redis also has more unique functionality with list / set / bitmap operations, so you can do "more" out of the box.

Whether you want to store more complex or nested data, or need more performance on a single machine or clustering, then Aerospike gets the job done with lower operating costs. Very fast performance and easy cluster setup, with all nodes having the same role so you can scale read and write.

That's a big difference, scalability outside of a single core or server. With Lua scripting, you can fill in any custom function that Redis has in Aerospike. If you have a lot of data (like TB), then the Aerospike SSD feature means you get RAM-like performance without the cost of RAM.

+4


source


Have you looked at the tests? I believe that each of them works differently in different conditions and use cases:

http://www.aerospike.com/when-to-use-aerospike-vs-redis/

https://redislabs.com/blog/nosql-performance-aerospike-cassandra-datastax-couchbase-redis

0


source


Redis and Aerospike are different and both have their pros and cons, but Redis seems to be more appropriate than Aerospike in the following two cases:

  • when we don't need replication We use a large write-intensive cache and a very short TTL (20s) for deduplication. There is no point in replicating this data. Redis is likely to use half the CPU and less than half the RAM than Aerospike. It will be cheaper and faster, or even faster thanks to pipelining.

  • when we need datacenter cross-replication We have one big database that we need to access from 5 datacenters, many records, heavy reads. There is no perfect solution, but the best one so far keeps a central database in Redis and a copy in each datacenter using Master-Slave Redis replication.

0


source







All Articles