memcached replication

Wojtek Meler wmeler at wp.pl
Tue Aug 28 09:58:38 UTC 2007


Dustin Sallings pisze:
> 
> On Aug 27, 2007, at 4:39 , Wojtek Meler wrote:
> 
>> I think memcached server should be able to broadcast some kind of update
>> log that other instances would listen. It would also enable event
>> notification on state changes.
>> Anyone interrested in such feature ?
> 
>     I'm somewhat interested in being able to connect to an instance and 
> have it start feeding me notifications for anything that would 
> invalidate the cache for a particular key.

Do you think about registering on each item and specify verboseness like:

c:LISTEN <key> FULL
c:LISTEN <key2> EVENT
...
...
...
s:CHANGED <key> <data_len>
s:<new_data>
...
...
s:CHANGED key2
...
...
...
s:CHANGED key2

What I ment was replicating all commands that change state to all 
listeners. It will be easy to implement, provide simple replication and 
stil allow filtering on different process to reach event notifications.
I think I could provide patch that would add REPLICATE command with 
option to fetch current state. All state changes would be replicated 
with SET, DELETE and FLUSH_ALL commands. Also there will be additional 
option to commandline that make memcached process be replication client.
Commands recieved through replication connection won't be re-replicated.

Wojtek



More information about the memcached mailing list