当前位置:网站首页>Crazy God redis notes 12
Crazy God redis notes 12
2022-07-25 16:03:00 【Matcha flavored watermelon juice】
Manually configure the host after downtime
![]()
We put 81 As 80 The host .
Check it again 81 Information about :
Now its host is no longer 6379, It is 6380 了 .

We can see now 79 The service of the port has only one slave .

We can see our 80 Although there are both master and slave , But its permissions are still written from the slave .
our 80 Still can't write .
![]()
![]()
![]()
We can see us 80 Can get it 79 Written information ,81 The host is 80, however 80 The host is 79, therefore 81 You can get 79 Written information .
This model is called layer by layer link , Different from the way we copied before .

But in fact, we will not use these two methods .
Now let's 79 The port is closed :
So now can we 80 and 81 Choose the eldest of the two port services ?
This is a bit of a plot to usurp the throne . Usually before sentinel mode appears , We all do it manually .


At present, both of them are slaves .

We will manually turn itself into the boss now .
Let's restart now 6379:

6379 yes master.

But we can see 6380 Still the boss .
If the boss comes back at this time , You can only reconnect .
We can let him be a younger brother again .
Now we return to 6379 Host computer , The other is the one master and two slave mode of its slave , To learn the next sentinel mode , This is the point .
Sentinel mode :

Let's test :
Our current state is one master and two slaves , We need to configure our sentry :
Create a sentinel file ;
This is our voting mechanism , Let's Watch 6379.
sentinel monitor The name being monitored host port 1
The following number 1, On behalf of the host is hung up , Vote from the machine to see who becomes the host , The one with the most votes will become the host .
Then let's start our sentry :
We can see the documents that manage our sentry .
After we set the value for him , Then we'll turn it off .
my 6380 It's a mainframe .
If master The node is disconnected , At this time, one will be randomly selected from the slave .( Here is a voting algorithm )
Sentinel mode :
Let's put 6379 Connect it again :

It is no longer a host , Instead, it becomes a slave .
We'll find out about us 6379 Service has also become 80 Slave of .
If the host comes back at this time , Can only merge under the new host , As a slave , That's the rule of sentinel mode .
Cache penetration and avalanche :

our redis The basic content of is over .
边栏推荐
- R语言使用gt包和gtExtras包漂亮地显示表格数据:gt_bar_plot函数和gt_plt_bar_pct函数可视化百分比条形图、原始数据的百分比条形、缩放后的数据的百分比条形、指定数据对齐宽度
- MySQL 元数据锁(MDL)
- 开发者如何为React Native选择合适的数据库
- Ml image depth learning and convolution neural network
- Leetcode - 641 design cycle double ended queue (Design)*
- 【IJCAI 2022】参数高效的大模型稀疏训练方法,大幅减少稀疏训练所需资源
- 泰山OFFICE技术讲座:英寸,厘米,磅,派卡,提,行,字行,像素的换算关系
- Pytoch learning notes advanced_ CNN (using perception_module) implements MNIST dataset classification - (comments and results)
- Product dynamics - Android 13 high-efficiency adaptation new upgrade
- 如何构建面向海量数据、高实时要求的企业级OLAP数据引擎?
猜你喜欢

活动回顾|7月6日安远AI x 机器之心系列讲座第2期|麻省理工教授Max Tegmark分享「人类与AI的共生演化 」

Matlab simulation of BPSK modulation system (1)

LeetCode - 641 设计循环双端队列(设计)*

Circulaindicator component, which makes the indicator style more diversified

Visual studio 2022 view class diagram

Okaleido launched the fusion mining mode, which is the only way for Oka to verify the current output

「数字安全」警惕 NFT的七大骗局

CVPR 2022 | in depth study of batch normalized estimation offset in network

Huawei 2023 starts to warm up in advance! Zuo Shen's program code interview guide comes in handy

HDD杭州站·HarmonyOS技术专家分享HUAWEI DevEco Studio特色功能
随机推荐
Release of v6.5.1/2/3 series of versions of Xingyun housekeeper: the ability of database OpenAPI continues to be strengthened
I want to ask whether the variable configuration function can only be used in SQL mode
MySQL教程68-AS 设置别名
【服务器数据恢复】HP EVA服务器存储意外断电导致RAID信息丢失的数据恢复案例
报表工具的二次革命
LeetCode - 641 设计循环双端队列(设计)*
30行自己写并发工具类(Semaphore, CyclicBarrier, CountDownLatch)
Solve the vender-base.66c6fc1c0b393478adf7.js:6 typeerror: cannot read property 'validate' of undefined problem
mysql 隔离级别事务
CircleIndicator组件,使指示器风格更加多样化
记得那两句话
MySQL教程67-使用DISTINCT过滤重复数据
leetcode:528. 按权重随机选择【普通随机失效 + 要用前缀和二分】
What is a physical firewall? What's the effect?
R语言ggplot2可视化线图(line)、自定义配置标题文本相关内容颜色和图例(legend)颜色相匹配(和分组线图的颜色相匹配、match colors of groups)
MySQL tutorial 65 data in MySQL operation table
今天睡眠质量记录84分
CVPR 2022 | in depth study of batch normalized estimation offset in network
Wechat applet
Pytoch learning notes -- Summary of common functions of pytoch 1