Hello!
On Mon, Jul 15, 2013 at 1:59 AM, microwish wrote:
> Hi agentzh and everyone,
>
> After skipping reading resty-memcached memcached.lua, I found it doesn't
> support any hash algorithm especially consistent-hash for selecting a
> memcached server, Am I right? If so, in my opinion, mecached's power of
> distribution is severely limited, cos memcached's distribution nature is
> essentially achieved by memcache clients.
>
> If resty-memcached doesn't support "distribution", any plan to add it?
>
No, it's up to the user to define his hash algorithm, as described here:
https://groups.google.com/d/msg/openresty-en/fTTXtVrMhhc/yXXF6CqmS2gJ
To make such logic reusable, I'd rather see a generic Lua library that
implements various common hash algorithms that are not only usable for
lua-resty-memcached, but lua-resty-redis, lua-resty-mysql, and any
other things. You're welcome to contribute a lua-resty-sharding
library, for example :)
Best regards,
-agentzh