hxd/redis-sentinel-switch 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hxd/redis-sentinel-switch

最新稳定版本:v1.0.0

Composer 安装命令:

composer require hxd/redis-sentinel-switch

包简介

Redis sentinel switch, auto switch config redis standalone and sentinel

README 文档

README

Package dùng để tự động switch giữa redis standalone qua sentinel cho laravel.

**Nguyên lý hoạt động: **

Package này đơn giản chỉ over-write lại config mặc định của laravel để predis nhận biết được các cụm sentinel

Hướng dẫn

Cài đặt package:

composer require hxd/redis-sentinel-switch

Bạn cần config các biến môi trường sau vào .env:

# Nếu bạn để null thì mặc định laravel sử dụng standalone
REDIS_REPLICATION=sentinel

#Cụm sentinel master hoặc standalone
REDIS_HOST=_master_sentinel_host_
REDIS_PORT=26379
REDIS_PASSWORD=
REDIS_TIMEOUT=0.1

# Cluster name
REDIS_SENTINEL_SERVICE=mymaster
REDIS_SENTINEL_TIMEOUT=0.1
# Các cụm Sentinel Slave
REDIS_SENTINEL=tcp://slave_sentinel_1:26379,tcp://slave_sentinel_2:26379

统计信息

  • 总下载量: 196
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-05-03