当前位置:网站首页>Construction of redis master-slave architecture
Construction of redis master-slave architecture
2022-07-28 06:06:00 【Performer】
1: First, introduce the environment
Two alicloud servers : Master(34) Alibaba cloud Slave(226) Alibaba cloud
operating system :CentOS 7.9 64 position
Redis edition :6.2.6
signal communication : Adopt Intranet IP
2: Installation per server Redis
I wrote an article about installation before Redis Tutorials available
3:Slave Construction of nodes
(1): Open profile
cd /usr/local/redis-6.2.6/
vim redis.conf

2:slave Node settings for
replicaof masterip Address port
masterauth master password
replica-read-only yes
3: restart master, Start up slave node . complete
Master Node restart 
Slave Node restart 
4: test
master newly added key ,slave See if it exists The result is , success !
slave newly added key Whether to allow . Result not allowed , success !
5:java Application testing
test result
(1): When master Hang up , Write operation error ,slave Also keep reading function
(2):slave Hang up ,master Normal write operation , An error will be reported when reading . But at intervals 60 Apply cut-off after seconds slave Connect , from master Perform read operations . Resume normal reading and writing
(3): When slave When reconnecting , Application direct Restore the master-slave architecture
边栏推荐
猜你喜欢

服务可靠性保障-watchdog

【七】redis缓存与数据库数据一致性

【2】 Redis basic commands and usage scenarios

【5】 Redis master-slave synchronization and redis sentinel (sentinel)

小程序商城制作一个需要多少钱?一般包括哪些费用?

字节Android岗4轮面试,收到 50k*18 Offer,裁员风口下成功破局

使用pyhon封装一个定时发送邮件的工具类

【6】 Redis cache policy

1: Enable slow query log and find slow SQL

Wechat official account - authorized login
随机推荐
Continuous login problem
小程序开发
数字藏品成文旅产业新热点
50 MySQL exercises + Answers
Flume安装及使用
连续登陆问题
小程序商城制作一个需要多少钱?一般包括哪些费用?
MySQL select statement query; Operator after class practice
如何选择小程序开发企业
1: Enable slow query log and find slow SQL
mysql分页出现问题
Digital collections strengthen reality with emptiness, enabling the development of the real economy
Mars number * word * Tibet * product * Pingtai defender plan details announced
Briefly understand MVC and three-tier architecture
微信上的小程序店铺怎么做?
分布式集群架构场景优化解决方案:分布式ID解决方案
MYSQL的select语句查询;运算符课后练习
2:为什么要读写分离
ModuleNotFoundError: No module named ‘pip‘
7月7日国风廿四节气《小暑》来袭!!附..合..成..预..告..