当前位置:网站首页>Redis cluster re fragmentation and ask command
Redis cluster re fragmentation and ask command
2022-06-26 15:01:00 【Hua Weiyun】
redis Cluster re fragmentation and ASK command
redis Re slicing is to allocate time slot bits from one node to another , It also transmits the key value pair where the time slot is located .
Slicing principle
redis The fragmentation of the cluster is determined by redis-trib management .
First , Send... To the target node import command , When the target node is ready to import the key belonging to this slot - Value to time , send out migrating command , The source node is ready to store the key of this slot - The value pair obtains the key to be transferred from the source node , send out migrate Command to transfer the key , And after knowing that all keys have been transferred ,redis-trib Send... To any node in the cluster node Command to throw the information of the target node
import The command sets the target node's clusterState Structural importing_slots_from The value of the element of the corresponding slot in the array is changed to the value of the source destination clusterNode structure , and migrating command
ASK command
During re slicing , When the client sends a command related to the database key , The key is being migrated . here , The source node first checks to see if there is..., in its database , If you return to a non-existent source node , Then return to ASK Command error message , Guide the client to the target node , Then send the last command again . ASK Commands are also hidden in cluster environments . If the client receives ASK Error and move it to the node in the slot being imported , Then the client must send ASKING Command to resend the command for a specific key operation . If you don't send , The node will be rejected , And back to MOVED error . ASKING Command opens the of the client sending the command REDIS_ASKING. this id It's a one-off id, Running the command once will delete the id.
ASK Command and MOVED Distinction of command
ASK Command and MOVED The difference between orders is ,MOVED The error is transferred from the node responsible for the slot to another node , When the command of the slot is encountered in the future, send the command request directly to the node in charge of the slot . ASK The error is the temporary scheme used during the migration of two nodes , In the event of a ASK After error , The command request of the slot is still sent to the node currently responsible for the slot .
summary
Today is mainly about Redis The re segmentation of , If this article helps you , Give me a compliment ~
️ Thank you for your
If you think this is helpful for you :
- Welcome to follow me ️, give the thumbs-up , Comment on , forward
- Focus on
Panpan small class, Push good articles for you regularly , There are also group chat and irregular lottery activities , You can say what you want , Communicate with the great gods , Learning together . - If there is anything inappropriate, you are welcome to criticize and correct .
边栏推荐
- R language GLM function logistic regression model, using epidisplay package logistic The display function obtains the summary statistical information of the model (initial and adjusted odds ratio and
- Electron
- R language uses ggplot2 to visualize the results of Poisson regression model and count results under different parameter combinations
- Get the intersection union difference set of two dataframes
- R语言使用glm函数构建泊松对数线性回归模型处理三维列联表数据构建饱和模型、使用step函数基于AIC指标实现逐步回归筛选最佳模型、使用summary函数查看简单模型的汇总统计信息
- Kubernetes的pod调度
- Informatics Olympiad 1405: sum and product of prime numbers (thinking problem)
- The JVM outputs GC logs, causing the JVM to get stuck. I am stupid
- View触摸分析
- 【 Native cloud】 Éditeur ivx Programmable par tout le monde
猜你喜欢

Electron

C语言刷题随记 —— 乒乓球比赛

The annual salary of 500000 is one line, and the annual salary of 1million is another line

feil_uVission4左侧工目录消失

【云原生】 ”人人皆可“ 编程的无代码 iVX 编辑器

详解C语言编程题:任意三条边能否构成三角形,输出该三角形面积并判断其类型

获取两个dataframe的交并差集

NAACL2022:(代码实践)好的视觉引导促进更好的特征提取,多模态命名实体识别(附源代码下载)...

Use abp Zero builds a third-party login module (II): server development

qt下多个子控件信号槽绑定方法
随机推荐
子查询的使用
网上找客户经理办理股票开户安全吗??
Electron
Excel-vba quick start (II. Condition judgment and circulation)
R language uses the aggregate function of epidisplay package to split numerical variables into different subsets based on factor variables, calculate the summary statistics of each subset, and use agg
券商经理给的开户链接安全吗?找谁可以开户啊?
一篇抄十篇,CVPR Oral被指大量抄袭,大会最后一天曝光!
大学生值得珍藏的实用网站推荐
What is the ranking of Guosen Securities? Is it safe to open a stock account?
Redis事务与watch指令
cluster addslots建立集群
The tablestack function of the epidisplay package of R language makes a statistical summary table (descriptive statistics of groups, hypothesis test, etc.), does not set the by parameter to calculate
打新债注册开户安全吗,有没有什么风险?
手机股票注册开户安全吗,有没有什么风险?
Datasets dataset class (2)
TS common data types summary
Numpy基本使用
Optimizing for vectorization
TCP congestion control details | 1 summary
【雲原生】 ”人人皆可“ 編程的無代碼 iVX 編輯器