An open API service indexing awesome lists of open source software.

https://github.com/caledoniaproject/resty-memcached-consistent

Consistent Hashing in memcached, a modified version of resty-memcached
https://github.com/caledoniaproject/resty-memcached-consistent

Last synced: 12 months ago
JSON representation

Consistent Hashing in memcached, a modified version of resty-memcached

Awesome Lists containing this project

README

          

## Consistent Hashing LUA memcache-client
Based on openresty memcached client

## Example usage


local memcached = require "resty.memcachedp"

-- initiate a new instance
local memc = memcached:new({
{ host = '127.0.0.1', port = 11211, hash = 12345 },
{ host = '127.0.0.1', port = 11212, hash = 12346 },
})

-- storage
memc:set ("abc", 123)

-- retrieving
print (memc:get ("abc"))

## Known problems

- multi_get, multi_set will not work with consistent hashing (correct me if I'm wrong)