What are the use cases where Redis is preferred to Aerospike?
Asked Answered
E

4

5

We are currently using Redis and it's a great in-memory datastore. We're starting to look at some new problems where the in-memory limitation is a factor and looking at other option. One we came across is Aerospike - it seems very fast, even faster than redis on in-memory single-shard operation.

Now that we're adding this to our stack, I'm trying to understand the use cases where Aerospike would not be able to replace redis?

Engulf answered 7/6, 2015 at 10:55 Comment(6)
To those marking to close - edited to be less subjectiveEngulf
Still calling for opinions - try stating the exact nature of your problems and the challenges you're trying to solve, instead of asking for recommendations.Sassaby
@ItamarHaber - I'm not asking for recommendations. I'm asking for places where one tool is a better fit than another. This seems very similar to https://mcmap.net/q/158116/-use-cases-for-nosql-closed #8182104 or #18592499Engulf
OK, what I meant is that I can pitch you with Redis until hell freezes and address all your problems/concerns - and I'd be happy to do it if you want :) As for Aerospike, perhaps there are users who can help with that on top of what Ronen wrote.Sassaby
I don't need you to pitch me on redis, we use it actively and I'm very familiar with it. And I don't have problems/concerns - I'm just looking for the cases where redis outshines aerospike. For a large set of problems, Aerospike seems to solve the problems better than Redis. In my research I think I have the answers I'm looking for - so I'll probably answer my own question for the benefit of the public.Engulf
You are indeed asking for recommendations. You are asking for recommendations on when a given tool is "better" than another tool. Answers to that are far too broad to be useful, and out of scope for stack overflow. As you stated, you don't have a specific code problem you are wanting solved, which is what this site is for - specific code problems.Handkerchief
F
6

Aerospike supports less data types than Redis, for example pub/sub is not available in Aerospike. However, Aerospike is a distributed key-value store and has superior clustering features.

The two are both great databases. It really depends on how big of a dataset you're handling, and your expectations of growth.

Fairway answered 8/6, 2015 at 4:45 Comment(0)
Q
5

Redis:

Key/value store, dataset fits into RAM in single machine or you can shard yourself across multiple machines (and/or cores since it's single-threaded), persists data to disk, has data structures like lists/sets, basic pub/sub, simple slave replication, Lua scripting.

Aerospike:

Key/value row-store (meaning value contains bins with values and those values can be more maps/lists/values to have multiple levels), multithreaded to use all cores, built for clustering across machines with replication, and can do cross-datacenter replication, Lua scripting for UDFs. Can run directly on SSDs so you can store much more data without it fitting into RAM.

Comparison:

If you just have a smaller dataset or are fine with single-core performance then Redis is great. Quick to install, simple to run, easy to just attach a slave with 1 command if you need more read scalability. Redis also has more unique functionality with list/set/bitmap operations so you can do "more" out of the box.

If you want to store more complicated or nested data or need more performance on a single machine or clustering, then Aerospike gets the job done really well with less operational overhead. Very fast performance and easy cluster setup with all nodes being exactly the same role so you can scale reads and writes.

That's the big difference, scalability beyond a single core or server. With Lua scripting, you can usually fill in any native feature that Redis has into Aerospike. If you have lots of data (like TBs) then Aerospike's SSD feature means you get RAM-like performance without the RAM cost.

Quarrelsome answered 11/11, 2015 at 15:26 Comment(0)
N
0

Have you looked at the benchmarks? I believe each one performs differently under 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

Noontime answered 27/5, 2016 at 22:4 Comment(0)
Q
-3

Redis and Aerospike are different and both have their pros and cons, but Redis seems a better fit than Aerospike in the 2 following use cases:

  1. when we don't need replication We are using a big cache with intensive writes and a very short ttl (20s) for deduplication. There is no point in replicating this data. Redis would probably use half as much cpu and less than half as much RAM than Aerospike. It would be cheaper and as fast, or even faster thanks to pipelining.

  2. when we need cross data-center replication We have one large database that we need to access from 5 data centres, lots of writes, intensive reads. There is no perfect solution but the best one so far seems to store the central database in Redis and a copy on each data centre using Redis master-slave replication.

Quillen answered 6/2, 2018 at 11:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.