Skip to content


Health check services and advertise BGP routes using ExaBGP.

Features Get ExaCheck

ExaCheck works in conjunction with ExaBGP to health check services and announce BGP routes based on the availability of those services.

ExaCheck is configured in a YAML or JSON based configuration file (example) which allows for easy configuration of health checks without having to create scripts.

Example Usage Scenario

As an example, you may have two DNS servers:

  • dns1:
  • dns2:

Both DNS servers have an IP bound to their loopback adapter to handle DNS requests: You would like to ensure that traffic to is load balanced between the two DNS servers. In case a server fails you would like it to stop receiving traffic.

To achieve this, you would deploy ExaBGP with ExaCheck; this example assumes it is located on the DNS servers themselves. You would setup BGP peering between ExaBGP and the router(s) that handle the traffic for ExaCheck would be configured to perform a health check to each server and advertise if a DNS response is received.

The ExaCheck configuration on both DNS servers would look something like this:


# The list of health checks

  - name: Example DNS Service
    description: Perform a basic SOA query for to If the query returns a response, would be advertised with BGP.
      method: dns
      host: # Note DNS queries are being sent to which should be bound to loopback
    nexthop: self

If the DNS service does not respond ExaCheck will then mark the service as down and withdraw the route for that server (providing high availability). When the service is healthy, the router for will be able to see two paths for with the same preference/metric thus allowing it to use equal cost multiple multipath or unequal cost multipath (providing load balancing).

With this setup no load balancer hardware/software is required. Depending on the router, they may also handle ECMP at line speed and without state; this can be advantageous for services that experience DDoS attacks due to bypassing a common choke point.

Why ExaCheck

ExaBGP is packaged with its own health checking script (see here) however it has some limitations which make it not suitable for my requirements.

The built in health check works fine for smaller environments where each service may be running its own instance of ExaBGP (so each instance of ExaBGP runs one or only a few processes) however for larger environments where health checks are centralized it becomes unmanageable.