All Projects → huyanping → redis-sentinel

huyanping / redis-sentinel

Licence: other
PHP 5.3+ redis-sentinel client for php based on phpredis extension.

Programming Languages

PHP
23972 projects - #3 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to redis-sentinel

Ledge
An RFC compliant and ESI capable HTTP cache for Nginx / OpenResty, backed by Redis
Stars: ✭ 412 (+724%)
Mutual labels:  redis-sentinel
Fastapi Plugins
FastAPI framework plugins
Stars: ✭ 104 (+108%)
Mutual labels:  redis-sentinel
Redis Windows
Vagrant redis configuration and the binary releases of MS Open Tech redis port of windows
Stars: ✭ 2,596 (+5092%)
Mutual labels:  redis-sentinel
Predis
A flexible and feature-complete Redis client for PHP.
Stars: ✭ 6,966 (+13832%)
Mutual labels:  redis-sentinel
Redis Sentinel Docker
Dockerfile for Redis Sentinel
Stars: ✭ 64 (+28%)
Mutual labels:  redis-sentinel
Aioredis Py
asyncio (PEP 3156) Redis support
Stars: ✭ 2,003 (+3906%)
Mutual labels:  redis-sentinel
Anotherredisdesktopmanager
🚀🚀🚀A faster, better and more stable redis desktop manager [GUI client], compatible with Linux, Windows, Mac. What's more, it won't crash when loading massive keys.
Stars: ✭ 17,704 (+35308%)
Mutual labels:  redis-sentinel
redis-config
Configuration, scripts and docs for setting up redis servers and sentinels in popular configurations
Stars: ✭ 102 (+104%)
Mutual labels:  redis-sentinel
Ioredis
🚀 A robust, performance-focused, and full-featured Redis client for Node.js.
Stars: ✭ 9,754 (+19408%)
Mutual labels:  redis-sentinel
Lua Resty Redis Connector
Connection utilities for lua-resty-redis
Stars: ✭ 186 (+272%)
Mutual labels:  redis-sentinel
Predixy
A high performance and fully featured proxy for redis, support redis sentinel and redis cluster
Stars: ✭ 862 (+1624%)
Mutual labels:  redis-sentinel
Fastonosql
FastoNoSQL is a crossplatform Redis, Memcached, SSDB, LevelDB, RocksDB, UnQLite, LMDB, ForestDB, Pika, Dynomite, KeyDB GUI management tool.
Stars: ✭ 1,001 (+1902%)
Mutual labels:  redis-sentinel
Camellia
camellia framework by netease-im. provider: 1) redis-client; 2) redis-proxy(redis-sentinel/redis-cluster); 3) hbase-client; 4) others
Stars: ✭ 146 (+192%)
Mutual labels:  redis-sentinel
Redix
Fast, pipelined, resilient Redis driver for Elixir. 🛍
Stars: ✭ 816 (+1532%)
Mutual labels:  redis-sentinel
docker-redis-haproxy-cluster
A Redis Replication Cluster accessible through HAProxy running across a Docker Composed-Swarm with Supervisor and Sentinel
Stars: ✭ 44 (-12%)
Mutual labels:  redis-sentinel
Lettuce Core
Advanced Java Redis client for thread-safe sync, async, and reactive usage. Supports Cluster, Sentinel, Pipelining, and codecs.
Stars: ✭ 4,319 (+8538%)
Mutual labels:  redis-sentinel
Redis Operator
Redis operator build a Highly Available Redis cluster with Sentinel atop Kubernetes
Stars: ✭ 125 (+150%)
Mutual labels:  redis-sentinel
td-redis-operator
一款强大的云原生redis-operator,经过大规模生产级运行考验,支持分布式集群、支持主备切换等缓存集群解决方案…The powerful cloud-native redis-operator, which has passed the test of large-scale production-level operation, supports distributed clusters and active/standby switching ...
Stars: ✭ 327 (+554%)
Mutual labels:  redis-sentinel
laravel-redis-sentinel-drivers
Redis Sentinel integration for Laravel and Lumen.
Stars: ✭ 100 (+100%)
Mutual labels:  redis-sentinel
Redex
Cloud-native Redis server implemented in Elixir
Stars: ✭ 160 (+220%)
Mutual labels:  redis-sentinel

redis-sentinel

Latest Stable Version Total Downloads Latest Unstable Version License travis

redis-sentinel client for php based on phpredis extension.

examples

Get Redis master address and create Redis object:

$sentinel = new \Jenner\RedisSentinel\Sentinel();
$sentinel->connect('127.0.0.1', 6379);
$address = $sentinel->getMasterAddrByName('mymaster');

$redis = new Redis();
$redis->connect($address['ip'], $address['port']);
$info = $redis->info();
print_r($info);

Create redis-sentinel pool and create Redis object:

$sentinel_pool = new \Jenner\RedisSentinel\SentinelPool();
$sentinel_pool->addSentinel('127.0.0.1', 26379);
$sentinel_pool->addSentinel('127.0.0.1', 26380);

$address = $sentinel_pool->master('mymaster');
print_r($address);

$redis = $sentinel_pool->getRedis('mymaster');
$info = $redis->info();
print_r($info);

In order to prevent redis/sentinel to wait too long for connections in case of issues with the Redis backend it's advisable to use a timeout (in seconds):

$sentinel_pool->addSentinel('127.0.0.1', 26380, 1.0); # 1 second timeout
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].