redis sentinel

redis 2015. 11. 30. 17:56

Redis sentinel은 redis failover를 위한 중개자.

http://redis.io/topics/sentinel

https://www.youtube.com/watch?v=fBDRO-d6cZQ

이 두개의 싸이트만 참조하면 대충 이해감.

Sentinel Config

sentinel monitor mymaster 127.0.0.1 6379 2
sentinel down-after-milliseconds mymaster 60000
sentinel failover-timeout mymaster 180000
sentinel parallel-syncs mymaster 1

레디스 홈피에서도 말하듯 이게 mymaster 레디스 셋을 위한 미니멈 셋팅. slave정보는 sentinel config에 없어도됨. 알아서 마스터를 통해 가져옴


Master

마스터는 원래 띄우던 config로 띄우고


Slave

slave녀석은 마스터 녀석 설정에 다음을 추가한다. (마스터 config에 별다른 특이사항이 없다면 그냥 아래만 추가해서 써도될듯)

port 6380

slaveof 127.0.0.1 6379

(여기서 센티넬이 다른머신에 있다면 127 말고 머신 ip 써야 failover 됨)


'redis' 카테고리의 다른 글

zscore list copy  (0) 2016.10.12
[Redis] HSET vs SET  (0) 2015.01.09
블로그 이미지

시간을 거스르는자

ytkang86@gmail.com

,