projecteru / redis-trib.py

Redis Cluster lib in Python
MIT License
135 stars 45 forks source link

rebalance and reshard support? #15

Open godaji opened 5 years ago

godaji commented 5 years ago

I want to use 'rebalance' and 'reshard', but I can't find in your project(redis-trib.py)

Where should I find it? If not, do you plan to make it?

zheplusplus commented 5 years ago

You can use the migrate command as an alternative. Though you have to specify which slots to migrate.

No plan for those yet.

godaji commented 5 years ago

ok, migrate is great. :) I’ll make reshard and rebalance as a wrapper by myself.

errorcode7 commented 5 years ago

slot分配为什么不用mod呢?这样以后增加节点方便自动均衡呀! 大概这样: master[]= n=len(master) master_slot[n][] for i in range(2^14): x =i mod n master_slot[x].apend(i)

zheplusplus commented 5 years ago

@errorcode7 Redis cluster 没有 "自动均衡" 一说.

There's no "auto-rebalance" in Redis cluster.