namoshek/laravel-redis-sentinel
Adds Redis Sentinel support to Laravel's Redis driver, enabling automatic master discovery and failover-aware reconnection for high-availability setups. Sentinel hosts, service names, and options are configured through the familiar database.redis config array.
Architecture fit: Namoshek/laravel-redis-sentinel is a narrow, single-purpose integration shim that teaches Laravel's Redis manager how to resolve a Sentinel-backed connection. It targets the Illuminate\Redis component and registers a custom connector/connection class via a service provider, meaning it sits between our application's cache/queue/session layer and the underlying Redis topology. It is not a framework-wide dependency; it is only relevant if we run Redis in a high-availability configuration with Sentinel and want Laravel to discover the current primary automatically. If we use a managed Redis offering (AWS ElastiCache with cluster mode, Azure Cache) or a single-node Redis, this package delivers no value and should be rejected on scope grounds.
Integration feasibility: Low friction. It is a Composer package with an auto-discovered service provider, configured through config/database.php (redis → driver and sentinel options). No schema changes, no published migrations, no queue workers to restart beyond a normal deploy. v1.3.0's headline change — Laravel 13 support — is the meaningful signal here: it confirms the package is tracking the framework's release cadence rather than being abandoned. The remaining three changes are Dependabot bumps to CI actions (actions/checkout 5→6, actions/cache 4→5, sonarqube-scan-action 6.0.0→7.0.0), which carry zero runtime impact for consumers.
Technical risk: Low, with two caveats. First, the package overlaps with native capability — modern Laravel supports Sentinel through the sentinel key in the Redis config for both phpredis and Predis — so we should verify we actually need the third-party shim before adding a dependency; choosing the package over the native path creates a maintenance surface we would otherwise not own. Second, v1.3.0's Laravel 13 support was contributed by Copilot (per the changelog attribution), which warrants a quick human review of the diff rather than blind trust, even though the change is additive compatibility. There are no breaking changes, deprecations, or config-key renames in this release; the minor version bump is appropriate.
Key questions: Which Laravel version are we targeting, and does the native Sentinel support already cover it? What Redis client (phpredis vs. Predis) is in use, and is that combination explicitly exercised by this package's test matrix? Has the Laravel 13 compatibility PR been reviewed for test coverage or is it a constraint-relaxation only? Who owns upgrades of this dependency — application platform or infrastructure?
Stack fit: Fits cleanly into a standard Laravel application on PHP 8.x with either phpredis or Predis. Configuration is declarative in config/database.php, and the package is transparent to Eloquent, cache, queue, and session consumers — they keep using the Redis facade and named connections as before. The main sequencing concern is that the sentinel connection must be defined as a distinct named connection so that rollback is a config change rather than a code revert.
Migration path: Adopt in three steps. (1) Add the package at ^1.3 and confirm composer.lock resolves against our Laravel version. (2) Introduce a new named Redis connection (redis_sentinel) alongside the existing one, pointing at the sentinel host/port set and service name, and validate it in a non-production environment against a real Sentinel quorum. (3) Cut over cache/queue/session one workload at a time, keeping the original connection defined for fast rollback. Because v1.3.0 has no breaking changes, teams already on v1.2.0 can upgrade in place; teams on the native Sentinel configuration should not migrate to this package at all.
Compatibility: Laravel 13 is now explicitly supported, which extends the usable window and removes the main blocker for teams planning a framework upgrade. We should confirm the package's composer.json constraint is a range rather than a pinned version so Laravel 13 adoption and package upgrades can be sequenced independently. PHP version support should be checked against our runtime baseline before locking.
Sequencing: Bundle the v1.3.0 bump with the Laravel 13 upgrade rather than shipping it separately — it is the enabling dependency, and testing it in isolation gives little signal. The CI action bumps are noise from our perspective and require no coordination.
Maintenance: Very low touch. The package is small, has a single maintainer, and its surface area is limited to connection resolution. The real maintenance question is dependency health: a single-maintainer package is a bus-factor risk, but the code volume is small enough that forking or vendoring is a realistic contingency if it goes stale during a Laravel major. Laravel 13 support landing in a timely minor release is a positive signal on that risk.
Support: Community-supported open source, no vendor SLA. Internal triage should route through the application platform team, with a documented fallback: if the package breaks, swap to Laravel's native sentinel config keys, which is a config-level change, not a code rewrite. That fallback should be written down before adoption, not discovered during an incident.
Scaling: The package itself is not a scaling bottleneck — it resolves a primary address, and throughput is determined by the Redis topology and client. The scaling consideration is Sentinel failover behavior: after a promotion, Laravel must re-resolve the primary rather than hold a stale connection. We should validate reconnect behavior under a simulated failover, and confirm that long-lived processes (queue workers, Horizon) pick up the new primary without a manual restart. That is the single most important operational test for this integration.
Failure modes: (a) Sentinel quorum unavailable at boot — application cannot resolve a primary and Redis-dependent paths fail hard; we need a documented degraded-mode decision for cache vs. queue, since cache failures are usually tolerable and queue failures are not. (b) Stale primary after failover in long-running workers — mitigate with worker recycling or connection refresh settings. (c) Version drift if Laravel ships a major before this package follows — mitigate by pinning and by keeping the native-config fallback current. (d) Silent config errors, since a misconfigured Sentinel service name typically surfaces only at runtime; add a smoke test against a real Sentinel setup to CI.
Ramp-up: Minimal. Any engineer familiar with Laravel's Redis config can operate this; the conceptual lift is understanding Sentinel (primary discovery, quorum, failover) rather than the package. Budget roughly half a day for a platform engineer to stand up a local Sentinel trio (docker-compose), validate failover, and document the runbook. The CI action bumps in v1.3.0 require no team awareness.
How can I help you explore Laravel packages today?