What type of overhead are we looking at? Do you have benchmark numbers? Wouldn't this cause memcached to lock while its replicating an object? Do the nodes communicate to make sure data is in sync?

The approach I took when I wrote memcached proxy was that clients could connect to proxy for doing things such as set,delete, etc. The idea being you have a proxy on each host running local copy of memcached, in parallel the proxy makes 2 async requests to local/ remote server, reads client <-> local, disconnects client when done while commands are pushed across to remote (combining the multiple sets into larger packets for write buffer).


Chris Goffinet
[EMAIL PROTECTED]



On Nov 1, 2007, at 11:38 PM, HIROSE, Masaaki wrote:

Hi!

I said "I am also working for memcached replication" before:

 memcached replication
 http://lists.danga.com/pipermail/memcached/2007-September/005155.html

Finally, We implements all planned features and named this product
"repcaced".

We release pre patch at following URL and will relase first version if no
critical bug found.

 repcached-1.0RC4-1.2.2.patch.gz
 http://sourceforge.net/projects/repcached/

Any comments or advice or bug reports are welcome.

have fun!


main purpose:
 - redundancy memcached system
 - safe fail over

key features:
 - asynchronous data repliacation.
 - single master, single slave.
- support all memcached command (set, add, delete, incr/decr, flush_all)
 - slave become master if master going down.
- whole data copy to slave automatically when new slave connect to master.

how to:
 $ tar zxf tsng/memcached-1.2.2.tar.gz
 $ cd memcached-1.2.2/
 $ gzip -cd ../repcached-1.0RC4-1.2.2.patch.gz | patch -p1
 $ ./configure --enable-replication
     [notice: cannot set both --enable-replication and --enable-thread
     [        together.
 $ make
 # make install

 two machines "foo" and "bar".

 foo$ ./memcached          (start as master)
 bar$ ./memcached -x foo   (start as slave and connect to master(foo))

client set key/val to master(foo). we can get same value from slave(bar).

 if master(foo) is down, slave(bar) become new master.

 and re-start memcached at foo as slave.
 foo$ ./memcached -x bar   (start as slave and connect to master(bar))

all data which master(bar) have will copy to new slave(foo), then master
 and slave have same data.


--
HIROSE Masaaki

Reply via email to