PHPackages                             lamoda/redis-sentinel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. lamoda/redis-sentinel

AbandonedArchivedLibrary[Caching](/categories/caching)

lamoda/redis-sentinel
=====================

Configuration wrapper for redis-sentinel or plain redis

0.3(4y ago)41.8k1MITPHPPHP &gt;=7.1 | &gt;=8.0

Since Apr 22Pushed 4y ago4 watchersCompare

[ Source](https://github.com/lamoda/redis-sentinel)[ Packagist](https://packagist.org/packages/lamoda/redis-sentinel)[ RSS](/packages/lamoda-redis-sentinel/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (3)Dependencies (3)Versions (6)Used By (0)

Lamoda redis sentinel
=====================

[](#lamoda-redis-sentinel)

[![Build Status](https://camo.githubusercontent.com/f05aa1c186571cffa607c9ce0938f183b67881b57d1daa56851caec3e0b38389/68747470733a2f2f7472617669732d63692e6f72672f6c616d6f64612f72656469732d73656e74696e656c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/lamoda/redis-sentinel)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/09d6eb061324eed51945d794dd22aa52bbaa1d3d89e0fcec8b4aba257fddb470/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c616d6f64612f72656469732d73656e74696e656c2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/lamoda/redis-sentinel/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/e3b6d17e3dfc3be6e52008f1c75e520443ec74ef95511fd74050fd66a4a4ee0d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c616d6f64612f72656469732d73656e74696e656c2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/lamoda/redis-sentinel/?branch=master)[![Build Status](https://camo.githubusercontent.com/c17418b94ba9b49b56d03c75c90adc6a704b6a3862322b404cc3d4d2f12bc87b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c616d6f64612f72656469732d73656e74696e656c2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/lamoda/redis-sentinel/build-status/master)

Redis configuration wrapper for use with redis sentinel or plain redis server. Used to get connection settings for sentinel or plain old redis if sentinel is not defined (say for dev/test environment).

### Usage example

[](#usage-example)

```
use Lamoda\RedisSentinel\RedisLocator;

$redisLocator = new RedisLocator(
    // plain redis:
    [
        'protocol' => 'tcp',
        'host' => 'redis-host',
        'port' => 6379,
        'dbindex' => 0,
        'connectionName' => uniqid('client-app', true),
    ],
    // redis sentinel:
    [
        'url' => 'redis-sentinel1:26379; redis-sentinel2:26379',
        'redisName' => 'mastername',
    ]
);

// Discover current sentinel master:
$redisConfig = $redisLocator->getRedisConfig();

$redis = new \Redis();
$redis->connect($redisConfig->getHost(), $redisConfig->getPort());
$redis->client('setname', $redisConfig->getConnectionName());
$redis->select($redisConfig->getDbIndex());
```

Or if you don't have sentinel:

```
$redisLocator = new RedisLocator(
    // plain redis:
    [
        'protocol' => 'tcp',
        'host' => 'redis-host',
        'port' => 6379,
        'dbindex' => 0,
        'connectionName' => uniqid('client-app', true),
    ],
    // redis sentinel:
    [
        'url' => '',
        'redisName' => 'mastername',
    ]
);

// Return plain redis config:
$redisConfig = $redisLocator->getRedisConfig();
```

### docker-compose for local usage

[](#docker-compose-for-local-usage)

You can use docker-compose files to ease local sentinel usage &amp; testing.

To start redis-sentinel containers:

```
docker-compose -f docker/docker-compose.yml up -d
```

Or using make:

```
make up
# ...
make down
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~340 days

Total

4

Last Release

1652d ago

PHP version history (2 changes)0.1.0PHP ^7.1

0.2PHP &gt;=7.1 | &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/d633b49bc9cb1b1d729d9a3c05110292c05654059c02874acfc6ec0d6530cddf?d=identicon)[HaiD84](/maintainers/HaiD84)

---

Top Contributors

[![HaiD84](https://avatars.githubusercontent.com/u/2562280?v=4)](https://github.com/HaiD84 "HaiD84 (2 commits)")[![Smolevich](https://avatars.githubusercontent.com/u/7188867?v=4)](https://github.com/Smolevich "Smolevich (2 commits)")[![josanr](https://avatars.githubusercontent.com/u/11454229?v=4)](https://github.com/josanr "josanr (1 commits)")[![omnilight](https://avatars.githubusercontent.com/u/3306537?v=4)](https://github.com/omnilight "omnilight (1 commits)")

---

Tags

phpredisredis-sentinel

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/lamoda-redis-sentinel/health.svg)

```
[![Health](https://phpackages.com/badges/lamoda-redis-sentinel/health.svg)](https://phpackages.com/packages/lamoda-redis-sentinel)
```

###  Alternatives

[iazaran/smart-cache

Smart Cache is a caching optimization package designed to enhance the way your Laravel application handles data caching. It intelligently manages large data sets by compressing, chunking, or applying other optimization strategies to keep your application performant and efficient.

21114.2k](/packages/iazaran-smart-cache)[indatus/laravel-ps-redis

A simple sentinel/redis driver wrapper for laravel.

4835.4k](/packages/indatus-laravel-ps-redis)[phpfastcache/phpssdb

PHP SSDB Driver for phpFastCache

14736.9k1](/packages/phpfastcache-phpssdb)[ichhabrecht/intcache

Turn uncachable page objects into cacheable links

193.9k](/packages/ichhabrecht-intcache)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
