We usually say that the dual-machine hot standby means that two machines are running, but not both machines are at the same time providing services. When one of the service providers fails, the other one will automatically take over and provide the service immediately, and the switch time is very short. before combing the MySQL master-slave synchronization, the following mysql+keeoalived dual master hot standby high-availability program implementation.
1) The keepalived works by VRRP (virtual Router redundancy Protocol) VPN Routing Redundancy protocol. There are two important sets of concepts in VRRP: VRRP routers and virtual routers, master routers, and backup routers. 2) VRRP router refers to the router running VRRP, is a physical entity, the virtual router refers to the VRRP protocol created, is a logical concept. A group of VRRP routers work together to form a virtual router. There is an electoral mechanism in the VRRP that selects the routing that provides the service, the master route, and the other is the backup route. When the master route fails, a master route is re-elected in the backup route to continue working to guarantee uninterrupted service.
Next, the deployment process:
In general, the deployment process is: First configure the MySQL dual master mode, and then configure the keepalived high availability, and then the client through the VIP connection to the database; when one of them goes down, the VIP drifts to the other side, a process that is virtually non-sensory to the client's data connection for high availability. The keepalived high-availability configuration in MySQL master-slave mode is similar, except that the main main mode of MySQL is Data bidirectional synchronization, while master-slave mode is one-way synchronization. Both master-slave and Main-master mode can be used to achieve data recovery, when one of the downtime, manually switch the connection to another, and after the addition of keepalived, you can achieve automatic switching. Environment Description: centos6.8master1:182.48.115.238 install MySQL and keepalivedmaster2:182.48.115.237 Install MySQL and Keepalivedvip:182.48.115.236mysql installation can refer to: http://www.cnblogs.com/kevingrace/p/6109679.html one, Master1 (182.48.115.238) operational records on the server
Mysql+keeoalived Dual Master Hot standby high availability operation record