当前位置:网站首页>Kept to implement redis autofailover (redisha) 14
Kept to implement redis autofailover (redisha) 14
2022-06-27 01:01:00 【franket】
Here are the differences
4c4
< router_id LVS_redis-b
router_id LVS_redis-a 19c19
< priority 139
priority 138priority The range is 1-255
Note: priority High values will automatically become master , So when assigning priorities master To set a relatively high value , But it can't be compared with backup Higher than weight Adjustment value , otherwise keepalived The check found that the service was unavailable , Corresponding priority After reducing , It's still better than backup High priority , So I will continue to act as master , Don't let go VIP, At this point, the client access will not achieve the desired results
Startup sequence
This redis+keepalived The start-up sequence of the cluster is quite particular , Otherwise, there will be an accident
Start as master Of redis ( Or there is just one running in production redis)
Start as slave Of redis
stay slave On the implementation SLAVEOF And master To synchronize ( Select a service low peak point )
adjustment master Upper keepalived priority Make its value s.priority < m.priority < s.priority+weight ( In order to master By keepalived After checking and confirming the failure ,slave You can become a new candidate by your own priorities master)
start-up master Upper keepalived
start-up slave Upper keepliaved
Note: This way you can only fight once master Unplanned failover of , Or planned switching , If you want to use it again , You have to manually build again in the above order , Why not automate , Because ,SLAVEOF It's a lethal order , Normal conditions can cause significant stress on the server , Accidents can ruin master The data on the , For example, with an empty redis To synchronize , Will cause their own data to be erased
边栏推荐
猜你喜欢

The world is very big. Some people tattoo QR codes on their necks

Lwip之定时机制

自定义MVC(导成jar包)+与三层架构的区别+反射+面试题
![Custom jsp[if, foreach, data, select] tag](/img/a2/fc75c182d572d86f4466323e31d6c3.png)
Custom jsp[if, foreach, data, select] tag

IIS 部署静态网站和 FTP 服务

What is the difference between the working principle of gas-liquid slip ring and other slip rings

Pet hospital management system based on SSMP

Law of Large Numbers

How to convert an old keyboard into a USB keyboard and program it yourself?

C#程序结构预览最基础入门
随机推荐
Operating instructions and Q & A of cec-i China learning machine
Keepalived 实现 Redis AutoFailover (RedisHA)14
解决unable to create a folder to save the sketch: mkdir sketch
Oracle database basics concepts
What are the skills and methods for slip ring installation
Flink practical problems (VII): no watermark (watermarks are only available eventtime is used)
memcached基础1
CH423要如何使用,便宜的国产IO扩展芯片
Network in network (dolls)
LeetCode 142. 环形链表 II
The most difficult 618 in history, TCL won the first place in both jd.com and tmall.com shares in the TV industry
如何把老式键盘转换成USB键盘并且自己编程?
CEC-I 中华学习机使用说明与问答
自定义MVC(导成jar包)+与三层架构的区别+反射+面试题
Custom MVC (imported into jar package) + difference from three-tier architecture + reflection + interview questions
Basic introduction to C program structure Preview
Law of Large Numbers
Bootstrapblazor + FreeSQL actual combat chart usage (2)
memcached基础2
05 | standard design (Part 2): how to standardize the different styles of commit information, which are difficult to read?