Filip Pytloun | 4ab64a0 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 1 | ========== |
| 2 | Keepalived |
| 3 | ========== |
| 4 | |
| 5 | Keepalived is a routing software written in C. The main goal of this project is to provide simple and robust facilities for loadbalancing and high-availability to Linux system and Linux based infrastructures. Loadbalancing framework relies on well-known and widely used Linux Virtual Server (IPVS) kernel module providing Layer4 loadbalancing. Keepalived implements a set of checkers to dynamically and adaptively maintain and manage loadbalanced server pool according their health. On the other hand high-availability is achieved by VRRP protocol. VRRP is a fundamental brick for router failover. In addition, Keepalived implements a set of hooks to the VRRP finite state machine providing low-level and high-speed protocol interactions. Keepalived frameworks can be used independently or all together to provide resilient infrastructures. |
| 6 | |
| 7 | |
| 8 | Sample pillar |
| 9 | ============= |
| 10 | |
Ales Komarek | 733b092 | 2016-01-05 16:27:21 +0100 | [diff] [blame] | 11 | Simple virtual IP on an interface |
| 12 | |
Filip Pytloun | 4ab64a0 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 13 | .. code-block:: yaml |
| 14 | |
| 15 | keepalived: |
| 16 | cluster: |
| 17 | enabled: True |
| 18 | instance: |
Ales Komarek | 733b092 | 2016-01-05 16:27:21 +0100 | [diff] [blame] | 19 | VIP1: |
Filip Pytloun | 4ab64a0 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 20 | priority: 100 (highest priority must be on primary server, different for cluster members) |
| 21 | virtual_router_id: 51 |
| 22 | password: pass |
| 23 | address: 192.168.10.1 |
| 24 | interface: eth0 |
Ales Komarek | 733b092 | 2016-01-05 16:27:21 +0100 | [diff] [blame] | 25 | VIP2: |
Filip Pytloun | 4ab64a0 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 26 | priority: 150 (highest priority must be on primary server, different for cluster members) |
| 27 | virtual_router_id: 52 |
| 28 | password: pass |
| 29 | address: 10.0.0.5 |
| 30 | interface: eth1 |
Ales Komarek | 733b092 | 2016-01-05 16:27:21 +0100 | [diff] [blame] | 31 | |
| 32 | Multiple virtual IPs on single interface |
| 33 | |
| 34 | .. code-block:: yaml |
| 35 | |
| 36 | keepalived: |
| 37 | cluster: |
| 38 | enabled: True |
| 39 | instance: |
| 40 | VIP1: |
| 41 | priority: 100 (highest priority must be on primary server, different for cluster members) |
| 42 | virtual_router_id: 51 |
| 43 | password: pass |
| 44 | addresses: |
| 45 | - 192.168.10.1 |
| 46 | - 192.168.10.2 |
| 47 | interface: eth0 |
Filip Pytloun | 4ab64a0 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 48 | |
| 49 | Read more |
| 50 | ========= |
| 51 | |
| 52 | * https://raymii.org/s/tutorials/Keepalived-Simple-IP-failover-on-Ubuntu.html |