smira / redis-resharding-proxy

Redis Resharding Proxy
MIT License
177 stars 27 forks source link

ketama distribution #2

Open ktiwary opened 9 years ago

ktiwary commented 9 years ago

I used the proxy for resharding based on keys pattern and it worked like a charm. I was wondering if you can add a support for the ketama distribution too. https://github.com/twitter/twemproxy/blob/master/src/hashkit/nc_ketama.c

Where one can give the algo name instead of key pattern to the proxy. Eg:- redis-resharding-proxy --master-host=redis1.srv --proxy-port=5400 --distribution=ketama --hash=murmur

smira commented 9 years ago

@ktiwary that should be fairly easy to add.

AFAIK there's no libketama in Go. There are some side projects, like this one: https://github.com/dgryski/go-ketama/

If we go some libketama in Go, I would integrate it.

smira commented 9 years ago

There's also https://github.com/ngerakines/ketama - I'm not sure which one is better, or they're identical.