Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.
shthead edited this page May 12, 2016 · 4 revisions

Welcome to the exabgp-healthcheck wiki!

The following pages cover various aspects of the Health Check script:

What is this?

ExaBGP healthcheck is a simple Perl script for use with ExaBGP which can control the announcing of routes based on the status of health checks. The health checks can be anything you like - the script only cares about the exit code (0 is success, anything else is a failure).

Features:

  • IPv4 and IPv6 support
  • Configuration file changes are applied automatically, no need to reload/restart services. The configuration file is verified before applying changes, if there are errors the changes will not be applied.
  • Health checks can call your own scripts, normal CLI utilities etc.
  • Multiple services can be defined with different IP addresses
  • Easy monitoring of service status - plain text files contain the current status of services, the image name for the process also has the current status
  • Command line options to view the current status, validate config etc.
  • Logging (with debug options)
  • Ability to specify BGP communities for routes

As an example of what this can be used for, see my blog post.

Use cases

DNS

I use this in production for my DNS clusters. I use PowerDNS as the DNS server (for both caching and authoritative).

For authoritative DNS, I hosted 2 instances of PowerDNS - one for customer zones and one for internal zones. There are 2 health checks that run for each instance, one for IPv4 and one for IPv6. Each DNS server has the same metric for outgoing routes. If the service is healthy the load is spread across each of the DNS servers. If the health checks are failing the server is automatically removed from the pool within a few seconds.

For caching DNS lookups, each data center has the same IP addresses for DNS. IPSEC tunnels are used to join the data centers together, with the routes from each data center being announced over BGP. In the event of the DNS cluster in one data center going down, BGP will route around the issue automatically and send the DNS requests to one of the still working data centers.

Others

If you are using this in production I would love to hear about it and add it to this page, send me an email to exabgp@sysadminblog.net.

Clone this wiki locally