🌈 TIL
- 과반수 표를 받아야 해서 sentinel은 홀수인 3개로 구성했다.
✨ Redis-Sentinel
- Redis Sentinel은 Redis Cluster를 사용하지 않을 때 HA를 제공한다.
- Monitoring
- Notification
- Automatic failover
- Configuration provider
💕 sentinel 설치
apt-get install redis-sentinel
🔍 sentinel.conf 수정
- bind 172.23.0.1 127.0.0.1 ::1로 수정한다.
- sentinel monitor mymaster 172.23.0.1 27890 1 👉 master의 호스트와 포트번호를 mymaster라는 이름으로 등록한다. 투표는 1개만 받아도 됨
sudo vi /etc/redis/sentinel.conf
🪐 Redis-Sentinel conf 파일 작성
- 다운되었다고 인지하는 시간은 3초
port 37890
daemonize yes
sentinel monitor mymaster 172.23.0.1 27890 1
sentinel down-after-milliseconds mymaster 3000
🍯 sentinel 서버 시작
✨ sentinel 정보 확인
참고 👇👇👇
https://redis.io/docs/management/sentinel/
https://syhwang.tistory.com/47
반응형
'DB > Redis' 카테고리의 다른 글
SpringBoot와 Redis Master-Slave 연동 (0) | 2024.04.02 |
---|---|
Redis (0) | 2023.05.07 |
Redis Class 및 Interface | 어노테이션 | redis-cli | 메소드 (0) | 2022.07.27 |