当前位置:网站首页>简单解决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就失效了,再次连接需要重新使用该命令
边栏推荐
- Web API configuration custom route
- SSL证书错误怎么办?浏览器常见SSL证书报错解决办法
- 2048 game logic
- 阻止瀏覽器後退操作
- 查看多台机器所有进程
- 《看完就懂系列》15个方法教你玩转字符串
- How to understand super browser? What scenarios can it be used in? What brands are there?
- Basics - rest style development
- MFC pet store information management system
- 高校毕业求职难?“百日千万”网络招聘活动解决你的难题
猜你喜欢
Intelligent metal detector based on openharmony
In the last process before the use of the risk control model, 80% of children's shoes are trampled here
技术管理进阶——什么是管理者之体力、脑力、心力
NFT 交易市场主要使用 ETH 本位进行交易的局面是如何形成的?
Oneforall installation and use
Idea set the number of open file windows
无密码身份验证如何保障用户隐私安全?
COMSOL -- 3D casual painting -- sweeping
13.(地图数据篇)百度坐标(BD09)、国测局坐标(火星坐标,GCJ02)、和WGS84坐标系之间的转换
7 themes and 9 technology masters! Dragon Dragon lecture hall hard core live broadcast preview in July, see you tomorrow
随机推荐
FreeRTOS 中 RISC-V-Qemu-virt_GCC 的调度时机
Cron expression (seven subexpressions)
MySQL giant pit: update updates should be judged with caution by affecting the number of rows!!!
How to understand super browser? What scenarios can it be used in? What brands are there?
Open3D 欧式聚类
Codeforces Round #804 (Div. 2)
Zcmu--1390: queue problem (1)
Four departments: from now on to the end of October, carry out the "100 day action" on gas safety
COMSOL -- establishment of 3D graphics
XML解析
跨境电商是啥意思?主要是做什么的?业务模式有哪些?
IPv6与IPv4的区别 网信办等三部推进IPv6规模部署
Project summary notes series wstax kt session2 code analysis
Is it difficult to apply for a job after graduation? "Hundreds of days and tens of millions" online recruitment activities to solve your problems
边缘计算如何与物联网结合在一起?
In the last process before the use of the risk control model, 80% of children's shoes are trampled here
7 大主题、9 位技术大咖!龙蜥大讲堂7月硬核直播预告抢先看,明天见
Unity xlua monoproxy mono proxy class
How does redis implement multiple zones?
Deepfake tutorial