codeigniter4 / codeigniter4/CodeIgniter4

add Redis Sentinel support

オープン
#9,787 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
PHP
スター
6k
フォーク
2k
平均マージ
1日 11時間
マージ済み PR(30日)
73

説明

### PHP Version

8.4

### CodeIgniter4 Version

4.6.3

### CodeIgniter4 Installation Method

Composer (using `codeigniter4/appstarter`)

### Which operating systems have you tested for this bug?

Linux

### Which server did you use?

apache

### Database

SQLServer 2019

### What happened?

CodeIgniter 4 currently supports Redis for cache and session management, but does not provide built-in support for Redis Sentinel. This limits high availability and automatic failover capabilities for applications using Redis clusters.

### Steps to Reproduce

1. Configure CodeIgniter 4 to use Redis for cache or session storage.
2. Attempt to connect to a Redis cluster managed by Sentinel using the current configuration options.
3. Observe that there is no way to specify Sentinel hosts or master name, and failover is not handled automatically.

### Expected Output

- CodeIgniter 4 should allow configuration of Redis Sentinel hosts and master name for cache and session management.
- The framework should automatically discover the current master node via Sentinel and handle failover seamlessly.
- Applications should remain highly available and continue to function even if the Redis master changes.
- For reference, see how Symfony implements Redis Sentinel support:
[https://symfony.com/doc/current/components/cache/adapters/redis_adapter.html#configure-the-connection](vscode-file://vscode-app/c:/Users/G549501/scoop/apps/vscode/1.105.1/resources/app/out/vs/code/electron-browser/workbench/workbench.html)

Image

### Anything else?

_No response_

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

ファイル、テスト、エントリーポイントは指定されていません。まず既存の Redis キャッシュとセッションの設定を見つけ、その接続オプションをリンク先の Symfony Sentinel リファレンスと比較してください。アプリケーションで Sentinel ホストと master 名を設定でき、現在の master を検出し、フェイルオーバー中も処理を継続できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
php, redis
領域
backend, databases
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。