当前位置:网站首页>简单解决redis cluster中从节点读取不了数据(error) MOVED
简单解决redis cluster中从节点读取不了数据(error) MOVED
2022-07-05 11:31:00 【我们一直在路上】
redis cluster集群中slave节点能成功复制master节点数据槽数据,但是无法get数据,显示只能到对应的master节点读取: (error) MOVED 742 36.112.201.233:6110
原因:Redis Cluster集群中的从节点,官方默认设置的是不分担读请求的、只作备份和故障转移用,当有请求读向从节点时,会被重定向对应的主节点来处理
解决办法:在get数据之前先使用命令readonly,这个readonly告诉 Redis Cluster 从节点客户端愿意读取可能过时的数据并且对写请求不感兴趣
注意:断开连接后readonly就失效了,再次连接需要重新使用该命令
边栏推荐
猜你喜欢
Huawei equipment configures channel switching services without interruption
【Office】Excel中IF函数的8种用法
AutoCAD -- mask command, how to use CAD to locally enlarge drawings
Harbor image warehouse construction
龙蜥社区第九次运营委员会会议顺利召开
MySQL giant pit: update updates should be judged with caution by affecting the number of rows!!!
[Oracle] use DataGrid to connect to Oracle Database
基础篇——REST风格开发
Ddrx addressing principle
分类TAB商品流多目标排序模型的演进
随机推荐
Summary of websites of app stores / APP markets
The art of communication III: Listening between people
COMSOL -- establishment of geometric model -- establishment of two-dimensional graphics
FFmpeg调用avformat_open_input时返回错误 -22(Invalid argument)
Differences between IPv6 and IPv4 three departments including the office of network information technology promote IPv6 scale deployment
Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in
分类TAB商品流多目标排序模型的演进
Go language learning notes - analyze the first program
SLAM 01. Modeling of human recognition Environment & path
7.2每日学习4
COMSOL--三维随便画--扫掠
In the last process before the use of the risk control model, 80% of children's shoes are trampled here
解决grpc连接问题Dial成功状态为TransientFailure
XML解析
MySQL giant pit: update updates should be judged with caution by affecting the number of rows!!!
Intelligent metal detector based on openharmony
Oneforall installation and use
SET XACT_ABORT ON
ZCMU--1390: 队列问题(1)
[SWT component] content scrolledcomposite