Redis Sentinel のサポート

こんにちは、

数年前に sentinel オプションを削除された のに気づきました。

それには特定の理由があるのでしょうか?

もし PR を作成しても受け入れていただけますか?

もし受け入れられない場合は、自分でパッチを適用します。その際の推奨事項があれば教えていただけますか。Ruby は久しぶりなので、少し不安です :wink:

ありがとうございます!

これは以前から機能していなかったと思います。

HA Redis の Concern を Discourse から分離し、HAProxy を使ってマスターまたはスレーブにリダイレクトするようにしてください。

設定例(マスター: 6379、スレーブ: 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

削除されたコードは実験的なものと見なされており、近い将来にそれをサポートする予定はありません。

「いいえ」というニュアンスのように聞こえますが、はっきりとはしていませんでした :slight_smile:

(これまでの洞察には感謝しています :))

すみません、そうですね。ここではプラグインの方が良い選択肢だと思います。Sentinel は私たちにとってあまりうまく機能しなかったので、コア製品でコミュニティ向けのオプションとして含めることは避けたいと考えています。