Since Redis has the notion of slots (that hold keys), is it possible to have a master less implementation of Redis Cluster where in which slots are replicated using consistent hashing algorithm. I am sure this must have already been thought about it , but I am curious. Also consistent hashing is is known to minimize the movement of keys during cluster resizing. Since Redis provides us commands to migrate the slots, is it worth while to implement consistent hashing ring using them.
Thanks in advance.
Comment From: madolson
First off, having a consistent hashing algorithm does not remove the need for masters, we still need a single node to be the authoritative writer to a slot.
For the second part of your question, there has been some discussions about using a consistent hash, but no material progress has been made. A fixed size number of slots actually has a number of material advantages such as it being much simpler to maintain and also reduces the number of actors involved during the rehashing. Using a consistent hash is also more complex for clients to implement, since we want clients to know which master owns which slots so it can send requests directly to it.
At this point it would require a good bit of work to move to a consistent hash, and I'm not sure the value is compelling right now. Let me know if that helps!
Comment From: vineelyalamarthy
@madolson
Thanks for your response.
In Redis Cluster, we have masters and replicas. Instead of one node completely replicating all the hashslots from another node, can we selectively replicate specific hashslots. I understand we can migrate specific slot, but can we also replicate a specific hashslot.
Comment From: madolson
We only support replicating an entire slot today.
Comment From: fox-half-tian
First off, having a consistent hashing algorithm does not remove the need for masters, we still need a single node to be the authoritative writer to a slot.
For the second part of your question, there has been some discussions about using a consistent hash, but no material progress has been made. A fixed size number of slots actually has a number of material advantages such as it being much simpler to maintain and also reduces the number of actors involved during the rehashing. Using a consistent hash is also more complex for clients to implement, since we want clients to know which master owns which slots so it can send requests directly to it.
At this point it would require a good bit of work to move to a consistent hash, and I'm not sure the value is compelling right now. Let me know if that helps!
Do you mean 'actors involved' refers to the 'number of nodes' or' number of keys' involved in data migration? This is just a beginner's question, I think it's about 'node count'.