I have encountered and examined the following scenario while using Redis as a queueing system (FIFO): 1. Adding an item 2. Appending the item key to a Redis list (RPUSH) 3. Retrieving/Removing the element from the list using LPOP

I understand that this heavily depends on the replication design but I am considering that my setup would greatly benefit (failover) if I could: 1. Enable Redis replication 2. Skip the LPOP command from replicating to the slaves 3. Allow other instances of the dequeueing mechanism to perform identical operations by issuing LPOP on the slaves, thus creating an asynchronous replicating environment

I am "borrowing" this notion from MySQL's SQL_LOG_BIN session variable which controls whether commands are records in the binary logs or not.

Thanks in advance for any feedback.

Comment From: georgepsarakis

I think this could be done through the propagate function which determines which commands will be replicated.

Comment From: mslayton

I've run across a similar problem to the one you describe above -- would be excellent to have a way to replicate only 'lpush' commands, but not 'lpop'.

I will follow this thread with interest.

Comment From: yossigo

The problem with selective replication is it results with an inconsistency between the master and replica. That said, it is currently possible to do using Lua scripts and the redis.set_repl() command as described here.