iT邦幫忙

0

Redis - Redis Sentinel

求解:用k8s helm去佈署Redis Sentinel,我們測試master掛掉的情況下,slave透過Sentinel機制切換成master,切換成master這個過程需要兩分多鐘的時間,這兩分多鐘服務(服務也是k8s佈署)會掛掉,請問有辦法讓服務不掛掉的情況下切換還是能把切換的時間縮短

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

1
Ray
iT邦大神 1 級 ‧ 2020-08-01 20:29:32

你這個參數設多少?

sentinel down-after-milliseconds

然後你的 Client 端怎麼設定?

如果照這篇做呢?
Redis HA 2 - Redis Sentinel

看更多先前的回應...收起先前的回應...
fiy0955 iT邦新手 5 級 ‧ 2020-08-05 09:14:06 檢舉

這邊有設定5秒,但是redis切換master還是需要兩分鐘

Ray iT邦大神 1 級 ‧ 2020-08-05 09:37:11 檢舉

那你的環境跟上面那篇一模一樣嗎?
有幾台 Quorum? 有加 HAProxy 嗎?

我們現在要用下面哪一種架構來討論?
redis master slave

fiy0955 iT邦新手 5 級 ‧ 2020-08-05 10:14:35 檢舉

https://ithelp.ithome.com.tw/upload/images/20200805/20119768oaFJGzZ895.pnghttps://ithelp.ithome.com.tw/upload/images/20200805/20119768ZsHD3soJRG.png

fiy0955 iT邦新手 5 級 ‧ 2020-08-05 10:18:19 檢舉

這是我目前的架構及參數設定,透過haproxy將資料(read/write)給master。

我要發表回答

立即登入回答