当前位置:网站首页>redis 哨兵模式
redis 哨兵模式
2022-07-23 11:23:00 【shuiloge】
定时检测主机是否故障,故障了自动根据投票将从机变主机
调整结构 先完成一主二仆的模式,6379带着80、81
自定义的/myredis目录下新建 sentinel.conf文件,名字绝不能错
配置哨兵,填写内容
sentinel monitor 被监控主机名字(自己起名字) 127.0.0.1 6379 1 如
sentinel monitor host6379 127.0.0.1 6379 1 |
上面最后一个数字1,表示主机挂掉后salve投票看让谁接替成为主机,得票数多的成为主机
cd /usr/local/redis/bin/
启动哨兵 ./redis-sentinel ../conf/sentinel.conf
正常主从演示
原有的master挂了
投票新选
重新主从继续开工,info replication 查看
问题:如果之前的master重启回来,会不会双master冲突? 不会 因为之前的主机 数据已经不完整
由于所有的写操作都是先在Master上操作,然后同步更新到Slave上,所以从Master同步到Slave机器有一定的延迟,当系统很繁忙的时候,延迟问题会更加严重,Slave机器数量的增加也会使这个问题更加严重。
边栏推荐
猜你喜欢

基于Matlab的SSB信号调制和解调(内附源码)

Analysis of data governance

【Pygame实战】打扑克牌嘛?赢了输了?这款打牌游戏,竟让我废寝忘食。

工业物联网中的时序数据

The landing process of 800V high-voltage fast charging was accelerated, and Junsheng Electronics was designated for the 500million euro project

946. 验证栈序列 ●● & 剑指 Offer 31. 栈的压入、弹出序列 ●●

深入理解L1、L2正则化

【论文学习】《Source Mixing and Separation Robust Audio Steganography》

C语言经典例题-将输入的两位数转成英文

没有了华为,高通任意涨价,缺乏核心技术的国产手机只能任由宰割
随机推荐
用rpm -e --nodeps进行批量删除
Opnsense - multifunctional, highly reliable and easy-to-use firewall (II)
Find the source code of the thesis
第二篇 如何设计一个RBAC权限系统
记一次SQL优化
Quickly master QML Chapter 5 components
C # calculate the number of times a character appears in the string
【攻防世界WEB】难度三星9分入门题(上):simple_js、mfw
Mathematical Modeling Typesetting
C语言书籍推荐
Camera flashlight modification
harbor镜像仓库
[paper study] source mixing and separation robot audio steganography
【云原生】docker环境中安装mysql、redis服务
Cookie和Session的区别
aws篇6 aws iot
Redis 删除Key命令会导致阻塞么?
Deep understanding of L1 and L2 regularization
可穿戴设备的自电容触摸控制器IT7259Q-13,IT7259EX-24
What is the real HTAP? (2) Challenge article