开发者

How to shard existing key-value storage?

Let's suppose that we have 3Gb key-value storage on server A. I'm starting to fe开发者_JAVA百科el that we need another server (server B). So, I have to separate server A data over shards (server A, server B), but... All keys on server A currently represented as is (for example, comment_ids:user_id:10).

Question #1: What is the best practice to hash current key names and separate all data over shards?

Question #2: What is the best practice of adding additional servers to shard's row?

PS: Sorry for my English, but I hope that my answer is clear for you.

Thank you.

PS: I've marked this question with redis tag, but really it's not about redis at all, but all key-value storages.


Consistent hashing tends to be a good choice http://en.wikipedia.org/wiki/Consistent_hashing

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜