0

I m new to My team in which we store the customer data with Hash in Redis. now our customers up to a million, and the Hash partition number is 8 which is const in the Server Code, and we select the partition by the customer ID, which is number 1 customer in partition 1, number 2 in partition 2, and number 9 still in partition 1, and so on. I wonder is 8 suited to the data? and as the customer numbers increase faster, should we adjust the partition number? and how should we choose? BTW, i m a totally newbie to Redis.

Tingur
  • 162
  • 2
  • 11

1 Answers1

0

What you are doing in sharding in Redis, and with your current logic, you might face scaling and key movement issues when you add a new partition, or try to increase the partitions. Thankfully, Redis 3.0+ supports Redis Cluster , which is stable and production ready, and has drivers in most programming languages. It will manage the partitioning for you automatically. This should be your preferred design.

DhruvPathak
  • 42,059
  • 16
  • 116
  • 175
  • Thanks for replying so quickly. I just checked the version of our redis, it's 2.8.9, so we need to upgrade our redis server. so after we upgrade the redis, does we still need the partition method as we did in the past? and may i ask what kind of changes should we make at the redis server when our customers go up to 10 millions ? – Tingur Apr 25 '16 at 08:19