当前位置:网站首页>简单解决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就失效了,再次连接需要重新使用该命令
边栏推荐
- Codeforces Round #804 (Div. 2)
- C#实现WinForm DataGridView控件支持叠加数据绑定
- Web API配置自定义路由
- go语言学习笔记-初识Go语言
- Cron表达式(七子表达式)
- Modulenotfounderror: no module named 'scratch' ultimate solution
- 无密码身份验证如何保障用户隐私安全?
- The art of communication III: Listening between people
- 解决grpc连接问题Dial成功状态为TransientFailure
- Implementation of array hash function in PHP
猜你喜欢

R3live series learning (IV) r2live source code reading (2)

高校毕业求职难?“百日千万”网络招聘活动解决你的难题

MySQL giant pit: update updates should be judged with caution by affecting the number of rows!!!

Pytorch training process was interrupted

How did the situation that NFT trading market mainly uses eth standard for trading come into being?

Characteristics and electrical parameters of DDR4
![[crawler] bugs encountered by wasm](/img/29/6782bda4c149b7b2b334238936e211.png)
[crawler] bugs encountered by wasm

idea设置打开文件窗口个数

COMSOL -- three-dimensional graphics random drawing -- rotation

How to introduce devsecops into enterprises?
随机推荐
C # to obtain the filtered or sorted data of the GridView table in devaexpress
Redis如何实现多可用区?
-26374 and -26377 errors during coneroller execution
Summary of websites of app stores / APP markets
Dspic33ep clock initialization program
I used Kaitian platform to build an urban epidemic prevention policy inquiry system [Kaitian apaas battle]
Is it difficult to apply for a job after graduation? "Hundreds of days and tens of millions" online recruitment activities to solve your problems
pytorch训练进程被中断了
Detailed explanation of MATLAB cov function
How to protect user privacy without password authentication?
管理多个Instagram帐户防关联小技巧大分享
7 themes and 9 technology masters! Dragon Dragon lecture hall hard core live broadcast preview in July, see you tomorrow
Solve the problem of slow access to foreign public static resources
COMSOL -- 3D casual painting -- sweeping
Manage multiple instagram accounts and share anti Association tips
Dynamic SQL of ibatis
Technology sharing | common interface protocol analysis
AUTOCAD——遮罩命令、如何使用CAD对图纸进行局部放大
汉诺塔问题思路的证明
Guys, I tested three threads to write to three MySQL tables at the same time. Each thread writes 100000 pieces of data respectively, using F