数据库
首页 > 数据库> > 阿里云redis-shake

阿里云redis-shake

作者:互联网

一、介绍

redis-shake是阿里云Redis&MongoDB团队开源的用于redis数据同步的工具。下载地址: https://github.com/alibaba/RedisShake/releases?spm=a2c6h.12873639.article-detail.4.4b8974957Y7slI

二、配置

第一次使用,如何进行配置: https://github.com/alibaba/RedisShake/wiki/第一次使用,如何进行配置?
官方介绍: https://developer.aliyun.com/article/691794

conf.version = 1
id = redis-shake-calling_scheduling
log.file = /root/RedisShake-release-v2.1.2-20220329/logs/redis-shake-calling_scheduling.log
log.level = info
pid_path = /root/RedisShake-release-v2.1.2-20220329/logs/
system_profile = 9310
http_profile = 9320
parallel = 32
source.type = standalone
source.address = user:password
source.auth_type = auth
source.tls_enable = false
source.tls_skip_verify = false
source.rdb.input =
source.rdb.parallel = 0
source.rdb.special_cloud = 
target.type = proxy
target.address = proxy_addr:6379
target.password_raw =
target.auth_type = auth
target.db = -1
target.dbmap =
target.tls_enable = false
target.tls_skip_verify = false
target.rdb.output = local_dump
target.version = 5.0
fake_time =
key_exists = none
filter.db.whitelist = 4
filter.db.blacklist =
filter.key.whitelist =
filter.key.blacklist =
filter.slot =
filter.command.whitelist =
filter.command.blacklist =
filter.lua = false
big_key_threshold = 524288000
metric = true
metric.print_log = true
sender.size = 104857600
sender.count = 4095
sender.delay_channel_size = 65535
keep_alive = 1
scan.key_number = 50
scan.special_cloud =
scan.key_file =
qps = 200000
resume_from_break_point = false
replace_hash_tag = false

三、启动

3.1 支持场景

redis-shake是我们基于redis-port基础上进行改进的一款产品。它支持解析、恢复、备份、同步四个功能。以下主要介绍同步sync。

3.2 安装 并启动 使用sync同步

wget https://github.com/alibaba/RedisShake/releases/download/release-v2.1.2-20220329/release-v2.1.2-20220329.tar.gz
tar xf release-v2.1.2-20220329.tar.gz
cd RedisShake-release-v2.1.2-20220329
bash build.sh
nohup ./redis-shake.linux -conf redis-shake.conf -type sync &  # 使用sync同步

四、遇到的问题

4.1 read error, please check source redis log or network

两个解决方向
① 修改redis的client-output-buffer-limit pubsub

CONFIG GET *
167) "client-output-buffer-limit"
168) "normal 0 0 0 slave 268435456 67108864 60 pubsub 33554432 8388608 60"  
  1. 对于普通客户端来说,限制为0,也就是不限制。因为普通客户端通常采用阻塞式的消息应答模式,何谓阻塞式呢?如:发送请求,等待返回,再发送请求,再等待返回。这种模式下,通常不会导致Redis服务器输出缓冲区的堆积膨胀;
  2. 对于Pub/Sub客户端(也就是发布/订阅模式),大小限制是8M,当输出缓冲区超过8M时,会关闭连接。持续性限制是,当客户端缓冲区大小持续60秒超过2M,则关闭客户端连接;
  3. 对于slave客户端来说,大小限制是256M,持续性限制是当客户端缓冲区大小持续60秒超过64M,则关闭客户端连接。

② 修改redis-shake的keep_alive
我这边下载redis-shake的时候,keep_alive 默认是0 ,我这边修改为1后,就不会有这个报错了

标签:target,redis,source,阿里,limit,shake,客户端
来源: https://www.cnblogs.com/-xuan/p/16147623.html