4

What are the advantages to using Redis Cluster over just using regular Redis and creating shards?

It seems to me like Redis Cluster is more about data safety (having the master-slave architecture account for failures).

Gukki5
  • 497
  • 6
  • 22

2 Answers2

1

I think the difference occurs when you need to reshard you cluster without losing any data.

Generally a hash strategy is used to evenly shard the data among several Redis servers, as both Redis 3.0 cluster and twemproxy do. When a new Redis is added into the cluster and some data load is supposed to be undertaken by it, how could you know if any data it should serve has not been migrated yet? Perhaps a brute force scan of entire key space is needed, or something smart like consistent hashing will do, but that is somehow complicated.

The 3.0 cluster ensure the data migration by introducing the hash slots, and when you migrate out a whole slot the Redis cluster ensures that no keys are left. But I'm afraid it's not an advantage because it has disadvantage too: when a slot is in a migrating status it is probably unavailable to serve queries.

Anyway, this strategy is adopted and supported by a lot of libraries and tools, which I think is an advantage.

neuront
  • 9,312
  • 5
  • 42
  • 71
1

One of the biggest advantage of using 3.0 cluster over using regular Redis and creating shards is performance. Redis 3.0 cluster offers much higher performance as compared to twemproxy or codes proxy etc.