Reference Official document: Http://keepalived.org/pdf/sery-lvs-cluster.pdf
Keepalived is a C-write routing software, with Ipvs Load balancing is practical and provides high availability through the VRRP protocol. Currently the latest version of the 1.2.7.Keepalived machine between the practical VRRP routing protocol switching VIP, switching speed of the second level, and there is no brain crack problem. Can implement the
can achieve a master multi-standby, the main hanging back automatic election, drift VIP, switching speed of the second level; You can change the business service state by running the specified script when switching.
such as two hosts A, B, you can switch between the following:
1. A, B to start, a for the main, b for the
2. The main A hangs, B takes over the business, as the main
3.A up, as from slaveof B
4.B hang off, a cut back to the main
will be a master of all, you can achieve master-slave, readable Write separation, can also be through a number of VIP, in one machine multiple instances of half master, half from, to achieve mutual backup, two machines at the same time responsible for part of the business, a downtime after the business is centralized on a platform
Installation configuration is relatively simple:
Dependent packages Required: Openssl-devel (Libssl-dev in Ubuntu), Popt-devel (Libpopt-dev in Ubuntu).
Profile Default path:/etc/keepalived/keepalived.conf You can also specify the path manually, but be aware that you manually specify that you need to use an absolute path. Primarily to ensure that the configuration file is correct, keepalived does not check whether the configuration conforms to the rules. The
runs with keepalived-d to start 3 daemons: A parent process, a check health check, a vrrp,-d writes the log to/var/log/message, and a log view to toggle the status.