The Virtual Router Redundancy Protocol (VRRP) is a computer networking protocol that provides automatic
assignment of available Internet Protocol (IP) routers to participating hosts. This increases the availability
and reliability of routing paths via automatic default gateway selections on an IP subnetwork.
The protocol achieves this by creation of virtual routers, which are an abstract representation of multiple routers, i.e. master and backup routers, acting as a group. The virtual router is assigned to act as a default gateway of participating hosts, instead of a physical router. If the physical router that is routing packets on behalf of the virtual router fails, another physical router is selected to automatically replace it. The physical router that is forwarding packets at any given time is called the master router.
VRRP provides information on the state of a router, not the routes processed and exchanged by that router. Each VRRP instance is limited, in scope, to a single subnet. It does not advertise IP routes beyond that subnet or affect the routing table in any way. VRRP can be used in Ethernet, MPLS and Token Ring networks with Internet Protocol Version 4 (IPv4), as well as IPv6.
The protocol is described in Internet Engineering Task Force (IETF) publication RFC 5798, which is an open standard, but Cisco claims that a similar protocol with essentially the same facility is patented and licensed; however, in 2001, in reply to a direct request, Robert Barr of Cisco replied that they will not assert any patent claims unless someone tried to assert a claim against Cisco. IBM also claims covering patents and their statement is readable on the IETF webpage.
When you have created a HA cluster the keepalived daemon can be used to monitor services or systems and to automatically failover to a standby if problems occur. It will work as on the image:
HAProxy-WI will keep configs synced between the master and the slave servers and restart them after editing config or after adding a new sections.
To create a HA cluster open Keepalived -> HA page. In the "Create new HA cluster" chose the master server and the slave server(in black boxes). After it chose the network interface, press down or start typing and HAProxy-WI will show you existing network interface on the master servers.
Enter VRRP IP address(in the green box) it will be used as failover address and you should route your traffic to this one.
And at the end press the "Create"(in the red box) button and you will have ready for using HA cluster.
After you have created the HA cluster HAProxy-WI will combine HAProxy and Nginx service as "Master-Slave". If it has not happened go to the Admin area(or Servers if you use groups) -> Servers tab and chose a master server:
After this combining HAProxy-WI will update config(and restart/reload, if need) for the slave, when you edited config on the master.
Also HAProxy-WI will keep sync uploaded SSL certificates and black/white lists.