twitter / twemproxy

A fast, light-weight proxy for memcached and redis
Apache License 2.0
12.13k stars 2.06k forks source link

Is twemproxy unscalable? #456

Open porunov opened 8 years ago

porunov commented 8 years ago

Hello,

Will we lose all data in all nodes if we will lose only one master node? If I've understood correctly, twemproxy uses consistent hashing. So, if we increase or decrease size of our cluster then all keys (or most of them) will be placed on incorrect nodes. Twemproxy can't automatically migrate/rebalance the cluster, so we will lose a lot of data if we just add or remove several nodes. Have I understood it correctly? Are there any tools which can migrate/rebalance automatically our data when we change size of the cluster?

Best Regards, Alexandr

charsyam commented 8 years ago

@porunov If you have n servers and add k or remove k servers then you will lose your data k/(n+k)

therealbill commented 8 years ago

@porunov if you need automatic rebalancing and migration have a look at codis. It requires a bit more but provides those features.

porunov commented 8 years ago

Thank you for the help. I think it is what I need