Public | Automated Build

Last pushed: a month ago
Short Description
IP watchdog and automatic failover for Exoscale EIP
Full Description

exoip: heartbeat monitor for Exoscale Elastic IP Addresses

exoip is a small tool meant to make the process of watching
Exoscale Elastic IP Addresses and performing state transitions much

exoip can run in one of three modes:

  • Association Mode: associates an EIP with an instance and exit.
  • Dissociation Mode: dissociates an EIP from an instance and exit.
  • Watchdog Mode: watches for peer liveness and handle necessary state transitions.

Watchdog protocol

The goal of exoip is to assert liveness of peers participating in
the ownership of an Exoscale Elastic IP. The assumption is that at
least two peers will participate in the election process.

exoip uses a protocol very similar to
and to some extent

The idea is quite simple: for each of its configured peers, exoip
sends a 24-byte payload through UDP. The payload consists of a
protocol version, a (repeated, for error checking) priority to help
elect masters, the Elastic IP that must be shared accross alll
peers, and the peer's Nic ID.

The layout of the payload is as follows:

  2bytes 2bytes  4bytes           16bytes
| PROTO | PRIO  |    EIP        |   NicID (128bit UUID)         |

When a peer fails to advertise for a configurable period of time, it
is considered dead and action is taken to reclaim its ownership of
the configured Elastic IP Address.


exoip is configured through command line arguments or an equivalent
environment variable:

    Association mode (exclusive with -D and -W)
    Dissociation mode (exclusive with -A and -W)
    Watchdog mode (exclusive with -A and -D)
    Host priority (lowest wins) (default 10, maximum 255)
-l string (or IF_BIND_ADDRESS)
    Address to bind to (default ":12345")
-p string (or IF_EXOSCALE_PEERS)
    peers to communicate with (may be repeated and/or comma-separated)
    Security-Group to build peer list from
-r int (or IF_DEAD_RATIO)
    Dead ratio (default 3)
    Advertisement interval in seconds (default 1)
-xi string (or IF_ADDRESS)
    Exoscale Elastic IP to watch over
-xk string (or IF_EXOSCALE_API_KEY)
    Exoscale API Key
-xs string (or IF_EXOSCALE_API_SECRET)
    Exoscale API Secret


If you wish to inspect exoip and build it by yourself, you may do so
by cloning this repository and
peforming the following steps:

make deps
Docker Pull Command
Source Repository

Comments (0)