# Predixy [中文版](https://github.com/joyieldInc/predixy/blob/master/README_CN.md)
**Predixy** is a high performance and fully featured proxy for redis sentinel and redis cluster
## Features
+ High performance and lightweight.
+ Multi-threads support.
+ Works on Linux, OSX, BSD, Windows([Cygwin](http://www.cygwin.com/)).
+ Supports Redis Sentinel, single/multi redis group[s].
+ Supports Redis Cluster.
+ Supports redis block command, eg:blpop, brpop, brpoplpush.
+ Supports scan command, even multi redis instances.
+ Multi-keys command support: mset/msetnx/mget/del/unlink/touch/exists.
+ Multi-databases support, means redis command select is avaliable.
+ Supports redis transaction, limit in Redis Sentinel single redis group.
+ Supports redis Scripts, script load, eval, evalsha.
+ Supports redis Pub/Sub.
+ Multi-DataCenters support, read from slaves.
+ Extend AUTH, readonly/readwrite/admin permission, keyspace limit.
+ Log level sample, async log record.
+ Log file auto rotate by time and/or file size.
+ Stats info, CPU/Memory/Requests/Responses and so on.
+ Latency monitor.
## Build
Predixy can be compiled and used on Linux, OSX, BSD, Windows([Cygwin](http://www.cygwin.com/)). Requires C++11 compiler.
It is as simple as:
$ make
To build in debug mode:
$ make debug
Some other build options:
+ CXX=c++compiler, default is g++, you can specify other, eg:CXX=clang++
+ EV=epoll|poll|kqueue, default it is auto detect according by platform.
+ MT=false, disable multi-threads support.
+ TS=true, enable predixy function call time stats, debug only for developer.
For examples:
$ make CXX=clang++
$ make EV=poll
$ make MT=false
$ make debug MT=false TS=true
## Install
Just copy src/predixy to the install path
$ cp src/predixy /path/to/bin
## Configuration
See below files:
+ predixy.conf, basic config, will refrence below config files.
+ cluster.conf, Redis Cluster backend config.
+ sentinel.conf, Redis Sentinel backend config.
+ auth.conf, authority control config.
+ dc.conf, multi-datacenters config.
+ latency.conf, latency monitor config.
## Running
$ src/predixy conf/predixy.conf
With default predixy.conf, Predixy will listen at 0.0.0.0:7617 and
proxy to Redis Cluster 127.0.0.1:6379.
In general, 127.0.0.1:6379 is not running in Redis Cluster mode.
So you will look mass log output, but you can still test it with redis-cli.
$ redis-cli -p 7617 info
More command line arguments:
$ src/predixy -h
## Stats
Like redis, predixy use INFO command to give stats.
Show predixy running info and latency monitors
redis> INFO
Show latency monitors by latency name
redis> INFO Latency <latency-name>
A latency monitor example:
LatencyMonitorName:all
latency(us) sum(us) counts
<= 100 3769836 91339 91.34%
<= 200 777185 5900 97.24%
<= 300 287565 1181 98.42%
<= 400 185891 537 98.96%
<= 500 132773 299 99.26%
<= 600 85050 156 99.41%
<= 700 85455 133 99.54%
<= 800 40088 54 99.60%
<= 1000 67788 77 99.68%
> 1000 601012 325 100.00%
T 60 6032643 100001
The last line is total summary, 60 is average latency(us)
Show latency monitors by server address and latency name
redis> INFO ServerLatency <server-address> [latency-name]
Reset all stats and latency monitors, require admin permission.
redis> CONFIG ResetStat
## Benchmark
predixy is fast, how fast? more than twemproxy, codis, redis-cerberus
See wiki
[benchmark](https://github.com/joyieldInc/predixy/wiki/Benchmark)
## License
Copyright (C) 2017 Joyield, Inc. <joyield.com#gmail.com>
All rights reserved.
License under BSD 3-clause "New" or "Revised" License
WeChat:cppfan ![wechat](https://github.com/joyieldInc/predixy/blob/master/doc/wechat-cppfan.jpeg)
没有合适的资源?快使用搜索试试~ 我知道了~
一个高性能、功能齐全的 redis 代理,支持 redis sentinel 和 redis cluster.zip
共134个文件
h:54个
cpp:42个
png:15个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 182 浏览量
2024-12-03
12:56:39
上传
评论
收藏 1.42MB ZIP 举报
温馨提示
Predixy中文版Predixy是 redis sentinel 和 redis cluster 的高性能、功能齐全的代理特征高性能且重量轻。多线程支持。适用于 Linux、OSX、BSD、Windows(Cygwin)。支持Redis Sentinel,单/多Redis组。支持Redis集群。支持redis block命令,例如blpop,brpop,brpoplpush。支持扫描命令,甚至支持多redis实例。多键命令支持mset/msetnx/mget/del/unlink/touch/exists。多数据库支持,意味着可以使用 redis 命令选择。支持redis事务,限制在Redis Sentinel单个redis组中。支持redis脚本,脚本加载,eval,evalsha。支持 redis Pub/Sub。多数据中心支持,从从属服务器读取。扩展 AUTH、只读/读写/管理权限、键空间限制。日志级别示例,异步日志记录。日志文件按时间和/或文件大小自动轮换。统计信息、CPU/内存/请求/响应等等。延迟监视器。建造Predixy
资源推荐
资源详情
资源评论
收起资源包目录
一个高性能、功能齐全的 redis 代理,支持 redis sentinel 和 redis cluster.zip (134个子文件)
command.conf 3KB
predixy.conf 2KB
auth.conf 2KB
latency.conf 2KB
standalone.conf 2KB
sentinel.conf 1KB
cluster.conf 1KB
dc.conf 781B
try.conf 98B
Handler.cpp 48KB
Conf.cpp 26KB
RequestParser.cpp 15KB
StandaloneServerPool.cpp 14KB
SentinelServerPool.cpp 13KB
Command.cpp 12KB
Request.cpp 11KB
ConfParser.cpp 9KB
ClusterServerPool.cpp 8KB
Buffer.cpp 8KB
ServerGroup.cpp 8KB
ResponseParser.cpp 7KB
AcceptConnection.cpp 7KB
ConnectConnection.cpp 7KB
ConnectConnectionPool.cpp 6KB
Response.cpp 6KB
Socket.cpp 5KB
ClusterNodesParser.cpp 5KB
Logger.cpp 5KB
LogFileSink.cpp 5KB
Proxy.cpp 4KB
Auth.cpp 3KB
Crc16.cpp 2KB
EpollMultiplexor.cpp 2KB
KqueueMultiplexor.cpp 2KB
ServerPool.cpp 2KB
DC.cpp 2KB
ListenSocket.cpp 2KB
ConnectSocket.cpp 2KB
PollMultiplexor.cpp 2KB
LatencyMonitor.cpp 2KB
Subscribe.cpp 1KB
Timer.cpp 1KB
HashFunc.cpp 1KB
AcceptSocket.cpp 1KB
Server.cpp 1KB
Connection.cpp 832B
Distribution.cpp 717B
main.cpp 498B
Enums.cpp 407B
Reply.cpp 294B
Alloc.cpp 246B
String.h 7KB
Conf.h 6KB
Alloc.h 5KB
Command.h 5KB
ServerPool.h 5KB
Buffer.h 5KB
Handler.h 4KB
Request.h 4KB
Deque.h 4KB
RequestParser.h 4KB
Logger.h 3KB
Response.h 3KB
LatencyMonitor.h 3KB
AcceptConnection.h 3KB
Server.h 3KB
ConnectConnection.h 3KB
List.h 2KB
Socket.h 2KB
Proxy.h 2KB
Stats.h 2KB
Timer.h 2KB
KqueueMultiplexor.h 2KB
Transaction.h 2KB
PollMultiplexor.h 2KB
ClusterNodesParser.h 2KB
EpollMultiplexor.h 2KB
ConnectConnectionPool.h 2KB
Util.h 2KB
ConfParser.h 2KB
ResponseParser.h 2KB
Exception.h 1KB
Predixy.h 1KB
ID.h 1KB
Common.h 1KB
DC.h 1KB
Enums.h 1KB
StandaloneServerPool.h 1KB
ClusterServerPool.h 1KB
SentinelServerPool.h 1KB
Auth.h 1KB
Connection.h 1KB
HashFunc.h 1KB
Sync.h 1KB
ConnectSocket.h 1KB
Subscribe.h 1KB
LogFileSink.h 1017B
ServerGroup.h 923B
Backtrace.h 847B
ListenSocket.h 682B
共 134 条
- 1
- 2
资源评论
徐浪老师
- 粉丝: 8430
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 纸板、面料、纸类、塑料检测68-YOLO(v5至v9)、COCO、CreateML、Darknet、Paligemma、TFRecord、VOC数据集合集.rar
- 【java源代码】基于spring+vue的音乐推荐管理(完整前后端+mysql+说明文档+LW).zip
- 长文本c++Aes加密
- 纸和塑料检测55-YOLO(v7至v9)、Paligemma、VOC数据集合集.rar
- 烟雾明火分割数据集labelme格式5205张2类别.zip
- 录音资源童声,录音资源童声
- 乱码文件内容分析与处理方法研究
- 数信号处理课程设计报告电子版2024.doc
- 毕业设计 - 仓储系统解决方案
- 签名检测21-YOLO(v8至v9)数据集合集.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功