redis性能调优

更新时间:2023-05-23 05:42:40 阅读: 评论:0

redis性能调优调整以下参数,可以⼤幅度改善Redis集群的稳定性:prentday
pem
donkey英文字母顺序记录⼀次redis集群⼀次排查过程:
总结来说,有以下⼏个问题:
1.由于cluster-node-timeout设置⽐较短,慢查询KEYS导致了集群判断节点8371失联
2.由于8371失联,导致8373升级为主,开始主从同步
3.由于配置client-output-buffer-limit的限制,导致第⼀次全量同步失败了
4.⼜由于PHP客户端的连接池有问题,疯狂连接服务器,产⽣了类似SYN攻击的效果
5.第⼀次全量同步失败后,从节点重连主节点花了30秒(超过了最⼤连接数1w)
关于client-output-buffer-limit参数:
# The syntax of every client-output-buffer-limit directive is the following:
#
# client-output-buffer-limit <class> <hard limit> <soft limit> <soft conds>
resist
#
# A client is immediately disconnected once the hard limit is reached, or if
# the soft limit is reached and remains reached for the specified number of
# conds (continuously).
# So for instance if the hard limit is 32 megabytes and the soft limit is
# 16 megabytes / 10 conds, the client will get disconnected immediately
# if the size of the output buffers reach 32 megabytes, but will also get
# disconnected if the client reaches 16 megabytes and continuously overcomes
# the limit for 10 conds.
#
# By default normal clients are not limited becau they don't receive data
# without asking (in a push way), but just after a request, so only
# asynchronous clients may create a scenario where data is requested faster
# than it can read.dance with my father
#
socks怎么读>中文翻译英语
# Instead there is a default limit for pubsub and slave clients, since
# subscribers and slaves receive data in a push fashion.
#
# Both the hard or the soft limit can be disabled by tting them to zero.
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
英文哲理故事
采取措施:
1.单实例的切割到4G以下,否则发⽣主从切换会耗时很长
2.调整client-output-buffer-limit参数,防⽌同步进⾏到⼀半失败
3.调整cluster-node-timeout,不能少于15s
英语四六级作文4.禁⽌任何耗时超过cluster-node-timeout的慢查询,因为会导致主从切换
Redis配置参数详解

本文发布于:2023-05-23 05:42:40,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/90/119193.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:集群   导致   节点   参数   主从   问题   升级   失联
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图