当前位置:网站首页>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 .
边栏推荐
- Save the image with gaussdb (for redis), and the recommended business can easily reduce the cost by 60%
- Sword finger offer | number of 1 in binary
- ServletConfig 类和ServletContext 类
- 开发者如何为React Native选择合适的数据库
- Pytoch learning notes -- seresnet50 construction
- 「数字安全」警惕 NFT的七大骗局
- Zhaoqi Kechuang high-level innovation and Entrepreneurship Talent Service Platform at home and abroad, mass entrepreneurship and innovation achievement transformation platform
- Pytoch learning notes advanced_ CNN (using perception_module) implements MNIST dataset classification - (comments and results)
- 产品动态丨Android 13 高效适配全新升级
- Pytoch learning notes - Teacher Liu Er RNN advanced chapter - code comments and results
猜你喜欢

Why is preparestatement better and safer?

哪个led显示屏厂家更好

ML - Speech - traditional speech model

ML - Speech - Introduction to speech processing

【莎士比亚:保持做人的乐趣】

Recommended collection, which is probably the most comprehensive coding method summary of category type features

Solve the vender-base.66c6fc1c0b393478adf7.js:6 typeerror: cannot read property 'validate' of undefined problem

Leetcode - 707 design linked list (Design)

tkinter模块高级操作(一)—— 透明按钮、透明文本框、自定义按钮及自定义文本框

LeetCode - 359 日志速率限制器 (设计)
随机推荐
【服务器数据恢复】HP EVA服务器存储意外断电导致RAID信息丢失的数据恢复案例
# JWT 图解
Baseband simulation system experiment of 4pam in Gaussian channel and Rayleigh channel
泰雷兹推出解决方案,助力SAP客户控制云端数据
面试突击:为什么 TCP 需要 3 次握手?
MySQL tutorial 66 data table query statement
MySQL教程67-使用DISTINCT过滤重复数据
Leetcode - 225 implements stack with queue
[IJCAI 2022] parameter efficient large model sparse training method, which greatly reduces the resources required for sparse training
记得那两句话
Mysql读写锁
Solve the vender-base.66c6fc1c0b393478adf7.js:6 typeerror: cannot read property 'validate' of undefined problem
Pytoch learning notes advanced_ CNN (using perception_module) implements MNIST dataset classification - (comments and results)
How to solve cross domain problems
How Google cloud disk is associated with Google colab
mysql意向锁
活动回顾|7月6日安远AI x 机器之心系列讲座第2期|麻省理工教授Max Tegmark分享「人类与AI的共生演化 」
MySQL - Summary of common SQL statements
Wechat applet
产品动态丨Android 13 高效适配全新升级