Fork me on GitHub

版权声明 本站原创文章 由 萌叔 发表
转载请注明 萌叔 | https://vearne.cc

引子:

公司一个项目需要使用Redis,单实例的Redis性能不够,但出于成本考虑,不打算使用集群模式,因而选择了Redis的Proxy模式,为了方便部署,干脆打成了RPM包。这里分享出来,以飨众人。

RPM包下载地址:

链接: https://pan.baidu.com/s/1dP7Ilo 密码: p456

说明:

构建简单的Redis Cluster
基于
1) Redis 版本为4.0.1
2) Redis Proxy 为唯品会开发的多线程版本的twemproxy –twemproxies(版本1.2.1)
项目地址:
https://github.com/vipshop/twemproxies

安装&&启动&&停止

1.安装
rpm -ivh redis_tp_cluster-0.0.1-4.x86_64.rpm  

安装完成以后,
1.1 配置文件在
/etc/redis中

## Redis共10个实例
/etc/redis/7001.conf
/etc/redis/7002.conf
/etc/redis/7003.conf
/etc/redis/7004.conf
/etc/redis/7005.conf
/etc/redis/7006.conf
/etc/redis/7007.conf
/etc/redis/7008.conf
/etc/redis/7009.conf
/etc/redis/7010.conf
# Redis Proxy 配置文件
/etc/redis/nutcrackers.yml

1.2 bin文件在

/usr/local/bin/redis-server
/usr/local/bin/redis-cli
/usr/local/bin/nutcrackers

1.3 启动脚本

/etc/init.d/redis_tp_cluster.sh
2.启动
/etc/init.d/redis_tp_cluster.sh start
3.停止
/etc/init.d/redis_tp_cluster.sh stop
重要

Redis Proxy默认
服务地址
127.0.0.1:22121
密码
b8@40fc02d52
如果需要调整请修改
/etc/redis/nutcrackers.yml

参考资料:
1.Redis rpm包下载地址

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据