Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am using redis as a cache server. Can I somehow configure multiple redis servers, that the cache is fully functional (read/write) even if some of them go offline?

I looked into master->slave, but the problem I see there is, that if the master fails, and I allow writes to the slaves, they get overwritten once the master is up again. Now the master just serves the old data.

The only solution I could come up was disabling write-to-disc, but that sucks as I loose everything if I have to restart the master. And I guess, slaves wouldn't be synced anymore if the master is gone.

share|improve this question
    
possible duplicate of Redis Master and Slave usage –  quanta Feb 23 '13 at 3:01
    
Not a duplicate as far as I can tell. –  dunxd Feb 25 '13 at 11:23

1 Answer 1

up vote 2 down vote accepted

There is no master-master setup in Redis.
What happens when your master server is going offline and you allow writes to the slave server:
The slave server becomes the master.

Obviously this requires changes of the configuration (can be done runtime).
And when you bring back the old-master you must sync the changes from the new-master.

Simply bringing up the master after a downtime would result in inconsistencies.

There is an nice explanation how to restart Redis without downtimes or data-loss:
http://redis.io/topics/admin

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.