Java – How to replicate Memcache data among servers

javamemcached

A same question in SO can be found from here . But since I couldn't find any suitable answer, I am asking with additional info.

I have many memcache clients but all of them access one memcache server currently. I want to start new couple of memcache instances (to handle the caching load) and replicate data among them (to avoid fail overs and data high availability).

I took a look at 'repcached' and as I found, it supports only replication among 2 instance(one is master and one slave) since I want to have more memcache servers it doesn't make sense that repcached is not a solution for me.

Also as mentioned in the same question(in my first top line), it suggests to implement replication from client side. How ever it won't be a good fit as where all my memcache clients used are memory performance sensitive locations.(my application requirement.)

Therefore, any one let me any sugession or solution how I can make memcache servers/instances replicate (any central location where all caches replicate among servers)? (all data will be duplicated , and any methodology like, master(write only) and slave(read) where master is down, the slave becomes the master ).

Best Answer

CouchBase has memcached compatible API, and it has replication and persistence features in addition to standard memcached features.