For your setup I suggest three Sentinels running in the same VM as
three Redis instances. Pick the right durability settings (AOF+fsync
one-sec should fit) and make sure to enable the options to refuse
writes when not enough slaves are connected (see Sentinel doc, is
clearly covered). Note that "no data loss" under all scenarios is not
possible with Redis in HA. The setup I outlined is pretty solid in the
real world but there are set of failures / partitions where data will
be lost, however you can pretty much bound the window of lost writes
during a failure event. Note: make sure to use a good Sentinel-capable
client.
Another thing you could do if you have Sets, is to use instead N
unrelated Redis masters and implement read-repair client side. This
way you end with an AP system with eventually consistent data
structures that have the property of eventually always remember
elements added, even if for some time during failures certain elements
may disappear (otherwise you need a CP system). An example of such a
system is SoundCloud Roshi, based on Redis. This solution would not
lose writes as long as W-1 failures occur (where W is the number of
instances you write to).
Salvatore
> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
redis-db+u...@googlegroups.com.
> To post to this group, send email to
redi...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/redis-db.
> For more options, visit
https://groups.google.com/d/optout.
--
Salvatore 'antirez' Sanfilippo
open source developer - Pivotal
http://pivotal.io
"If a system is to have conceptual integrity, someone must control the
concepts."
— Fred Brooks, "The Mythical Man-Month", 1975.