当前位置:网站首页>Redis源码解析:Redis Cluster
Redis源码解析:Redis Cluster
2022-08-05 09:14:00 【51CTO】

数据分区
对数据分区有很多种方式,比如对节点取余分区,一致性hash分区等,而Redis采用的是虚拟槽分区
slot = CRC16(key) & 16383

集群搭建

使用 cluster meet {ip} {port} 命令让节点之间
扩容和缩容

请求路由

ASK和MOVED的区别
MOVED代表槽的负责权已经从一个节点转移到另一个节点,客户端收到槽i的MOVED错误后后续每次遇到槽i的命令请求时,都可以直接将命令发送至MOVED指向的节点
ASK只是2个节点在迁移槽的过程中使用的一种临时错误,客户端收到槽i的ASK错误后只会在下一次请求中将命令发往ASK指向的节点,对后续不会产生任何影响
边栏推荐
- The difference between beautiful MM and ordinary MM
- 上海控安技术成果入选市经信委《2021年上海市网络安全产业创新攻关成果目录》
- How to replace colors in ps, self-study ps software photoshop2022, replace one color of a picture in ps with another color
- 使用稀疏 4D 卷积对 3D LiDAR 数据中的运动对象进行后退分割(IROS 2022)
- 请问如果想往mysql里面写数据,直接用flink-connector-jdbc就可以吧,可是我在f
- MySQL内部函数介绍
- 【无标题】目录
- express hot-reload
- “充钱”也难治快手的“亏亏亏”?
- express hot-reload
猜你喜欢

Why is pnpm hitting npm and yarn dimensionality reduction?

手把手教你纯c实现异常捕获try-catch组件

Dynamic memory development (C language)

基因数据平台

XSS靶机通关以及XSS介绍

Comprehensively explain what is the essential difference between GET and POST requests?Turns out I always misunderstood

嵌入式实操----基于RT1170 移植memtester做SDRAM测试(二十五)

工程制图直线投影练习

交换机端口的三种类型详解与hybrid端口实验

国际原子能机构总干事称乌克兰扎波罗热核电站安全形势堪忧
随机推荐
2022-08-01 回顾基础二叉树以及操作
js graphics operation one (compatible with pc, mobile terminal to achieve draggable attribute drag and drop effect)
工程制图直线投影练习
按钮上显示值的轮流切换
Excuse me if you want to write data in mysql, with flink - connector - JDBC directly is ok, but I'm in the f
科普大佬说 | 港大黄凯斌老师带你解锁黑客帝国与6G的关系
PAT乙级-B1021 个位数统计(15)
Dry goods!Generative Model Evaluation and Diagnosis
15.1.1、md—md的基础语法,快速的写文本备忘录
PAT Class B-B1019 Digital Black Hole (20)
mySQL数据库初始化失败,有谁可以指导一下吗
阿里云存储的数据库是怎么自动加快加载速度的呢www.cxsdkt.cn怎么设置案例?
使用 External Secrets Operator 安全管理 Kubernetes Secrets
Thinking and summary of the efficiency of IT R&D/development process specification
express hot-reload
thinkPHP5 实现点击量(数据自增/自减)
【LeetCode】623. 在二叉树中增加一行
16 kinds of fragrant rice recipes
CCVR基于分类器校准缓解异构联邦学习
使用稀疏 4D 卷积对 3D LiDAR 数据中的运动对象进行后退分割(IROS 2022)