当前位置:网站首页>Redis 主从复制
Redis 主从复制
2022-07-30 11:17:00 【yu-yuan】
Redis 集群
作用:1.主从备份,防止主机宕机;2.读写分离,分担master的任务;3.任务分离,如从服务器分别分担备份工作与计算工作
配置:
主服务器
使得Redis服务器可以跨网络访问
bind 0.0.0.0
设置 requirepass (redis 密码)
关闭保护模式 protected-mode no
配置slave
bind 0.0.0.0
设置 requirepass (redis 密码)
然后让slave来做工作:如RDB,开启rdb 改变dbfilename 为rdb结尾的文件
设置slaveof (如果使用的是redis高版本的slaveof 换成了replicaof)
这里是监听端口master的IP 即端口
将slave切换成只读模式(可以不换)
关闭保护模式 protected-mode no
边栏推荐
- 基于.NetCore开发博客项目 StarBlog - (16) 一些新功能 (监控/统计/配置/初始化)
- Explain the problem of change exchange in simple terms - the shell of the backpack problem
- 三个点语法和DOM观察者
- Telerik2022 R2,有效的自动化测试
- 【ASP.NET Core】选项类的依赖注入
- The battle-hardened programmer was also deceived by a fake programmer from a certain fish. The trust between programmers should be the highest, and he alone destroyed this sense of trust
- TensorFlow自定义训练函数
- 湖仓一体电商项目(一):项目背景和架构介绍
- 获取1688app上原数据 API
- 流水线上的农民:我在工厂种蔬菜
猜你喜欢
随机推荐
听到'演员工作比工人辛苦,吃得也不如工人好?'我笑了
Transfer Learning Technology Training
面试官:Redis中的布隆过滤器与布谷鸟过滤器,你了解多少?
【ASP.NET Core】选项类的依赖注入
GBJ2510-ASEMI电机专用25A整流桥GBJ2510
RandLA-Net复现记录
Explain the problem of change exchange in simple terms - the shell of the backpack problem
正则表达式快速入门笔记
向上管理读书笔记
鸿湖万联扬帆富设备开发板正式合入OpenHarmony主干
FPGA刷题——计数器(简易秒表、可置位计数器、加减计数器)
基于时延估计的扰动卡尔曼滤波器外力估计
淘宝/天猫淘宝评论问答列表接口 API
Vim plugin GrepIt
EA中的业务对象和业务实体你分得清吗?
typescript入门之helloworld
电流继电器JL-8GB/11/AC220V
[Cloud-Building Co-creation] Huawei Cloud and Hongmeng collaborate to cultivate innovative developers
UE5 GAS Study Notes Postscript 0
高手云集、丰富活动,斩获佳绩,超过2万名开发者参与的AI社团邀你加入!