Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

does redis cluster use consistent hashing

I'm using redis cluster 3.0.1.

I think redis cluster use consistent hashing. The hash slots are similar to virtual nodes in consistent hashing. Cassandra's data distribution is almost the same as redis cluster, and this article said it's consistent hashing.

But the redis cluster turorial said redis cluster does not use consistent hash.

What do I miss? Thanks.

like image 492
bylijinnan Avatar asked May 09 '18 06:05

bylijinnan


People also ask

What hashing algorithm does Redis use?

As it is known, Redis uses the CRC16 algorithm to map keys to hash slots.

Which DB uses consistent hashing?

Each node in the cluster is responsible for a range of data based on the hash value. So there you go, that's consistent hashing and how it works in a distributed database like Apache Cassandra, the derived distributed database DataStax Enterprise, or the mostly defunct (RIP) Riak.

How does Redis cluster work?

How It Works. Redis Cluster is an active-passive cluster implementation that consists of master and slave nodes. The cluster uses hash partitioning to split the key space into 16,384 key slots, with each master responsible for a subset of those slots.

What is the difference between Redis and Redis cluster?

The Redis Cluster supports only one database - indicated if you have a big dataset - and Redis supports multiple databases. The Redis Cluster client must support redirection, while the client used for Redis doesn't need it.


1 Answers

You are right, virtual nodes is quite simalar with hash slot.

But virtual nodes is not an original concept of consistent hashing, but more like a trick used by Cassandra based on consistent hashing. So it's also ok for redis to say not using consistent hashing.

So, don't bother with phraseology.

like image 127
Mobility Avatar answered Oct 24 '22 05:10

Mobility