Redis sentinels in same servers as master/slave?

前端 未结 4 1972
醉梦人生
醉梦人生 2021-02-06 09:37

I\'ve been doing some reading on how to use Redis Sentinel, and I know it\'s possible to have 2 or more sentinels, and load balance between them when calling from the client sid

4条回答
  •  灰色年华
    2021-02-06 10:16

    You can have sentinels on the same machine with master/slave, but the sentinels must be odd(3/5/7) in number. There should be atleast three sentinels and it is must to have a dedicated machine for atleast one sentinel.

    If you have only two nodes, then in case of a split-brain (network disrupt) situation, the slave will be promoted to master. Both the master now will accept data from clients.However, when things come back to normal, one of the master will be demoted as a slave. That master will lose all of its data as it is a slave now and will replicate the data from current master.

    check this for good a explanation of redis architectural desings and split-brain: http://www.yzuzun.com/2015/04/some-architectural-design-concepts-for-redis/

提交回复
热议问题