pierreozoux
(Pierreozoux)
September 10, 2020, 12:09pm
1
Hi,
I noticed you removed sentinel options some years ago .
Is there a specific reason for it?
If I make a PR, will you accept it?
If not, then I’ll monkey patch, if you have some recommendations for doing so, it has been a while I didn’t ruby
Thanks!
RGJ
(Richard - Communiteq)
September 10, 2020, 2:35pm
2
I think this never worked.
Just separate the concern for HA Redis to outside of Discourse and use HAProxy to direct to the master or slave.
Example config (master at 6379, slave at 6380)
listen redis_master
bind 127.0.0.1:6379
timeout client 30h
timeout server 30h
option tcp-check
tcp-check connect
tcp-check send AUTH\ *redis_password*\r\n
tcp-check expect string +OK
tcp-check send PING\r\n
tcp-check expect string +PONG
tcp-check send info\ replication\r\n
tcp-check expect string role:master
tcp-check send QUIT\r\n
tcp-check expect string +OK
server redis_data_0 10.10.10.10:6379 check inter 1s
server redis_data_1 10.10.10.11:6379 check inter 1s
listen redis_slave
bind 127.0.0.1:6380
timeout client 30h
timeout server 30h
option tcp-check
tcp-check connect
tcp-check send AUTH\ *redis_password*\r\n
tcp-check expect string +OK
tcp-check send PING\r\n
tcp-check expect string +PONG
tcp-check send info\ replication\r\n
tcp-check expect string role:slave
tcp-check send QUIT\r\n
tcp-check expect string +OK
server redis_data_0 10.10.10.10:6379 check inter 1s
server redis_data_1 10.10.10.11:6379 check inter 1s
4 Likes
tgxworld
(Alan Tan)
September 11, 2020, 12:37am
3
The code that was removed was considered experimental and we have no plans to support it in the near future.
6 Likes
pierreozoux
(Pierreozoux)
September 11, 2020, 10:27am
4
It sounds like a no, but it wasn’t really clear
(But thanks for the insights so far )
sam
(Sam Saffron)
September 11, 2020, 10:52am
5
Sorry, yeah I think a plugin is a better option here, sentinel never really worked well for us so we would prefer not to have it as an option for the community in the core product
3 Likes