- GeoDNS: by where the client is, its country or continent.
- Weights: one record picked at random by weight, for canaries and uneven load.
- Health checks: an address leaves the answers while its HTTP, HTTPS or TCP check fails (failover).
Set it up
- Dashboard
- CLI
1
Download the GeoIP database (for GeoDNS)
As a superadmin, open Settings → General → GeoIP database and click Download. Leave
Update monthly on. Weights and health checks work without it.
2
Steer a record
Open DNS → Zones, a zone, then an A or AAAA record, and click Traffic steering…. Pick
the countries or continents it is for, a weight, and a health check.
3
Test the check
Test now runs the health check once without saving. After saving, a green or red dot on
the record’s steering badge shows its health.
How an answer is picked
For a name whose records have steering:- Health: records whose health check is failing are left out. If every checked record of the name is failing, all of them are answered, so an outage of the checker doesn’t take the name off DNS.
- Place: records for the client’s country are answered. If there are none, those for its continent. If there are none, the records for no place in particular (the default). Without a default, every record left after step 1 is answered.
- Weight: when the remaining records have weights, one of them is answered, picked at random by weight. A record without a weight counts as 1; weight 0 only answers when all are 0.
Keep TTLs short on steered names, 30 to 60 seconds. Resolvers cache answers for the TTL, so a
failover or a weight change reaches clients only as fast as the TTL allows.
Examples
The canary from the table, from the CLI:
Where clients are
GeoDNS needs a country database in MaxMind’s.mmdb format. DNZ doesn’t ship one: download it under
Settings → General → GeoIP database, or with dnz geoip download.
By default that is DB-IP’s IP to Country Lite,
free under CC BY 4.0 (IP Geolocation by DB-IP),
refreshed monthly while Update monthly is on. DB-IP publishes a new file each month; DNZ fills
{year} and {month} into the URL and falls back to the month before early in a month.
Any country .mmdb works instead, for example a MaxMind GeoLite2 Country permalink with your license
key:
geoip-country.mmdb), read at startup and replaced in place
on every download.
A client is placed by its own address, or by the EDNS Client Subnet (RFC 7871) a resolver sends
on its behalf. The answer then carries the subnet back with that scope, so the resolver caches it for
that network only. Without a database, or for private addresses, every client gets the default
records.
Look up on the GeoIP card shows where an address is, as GeoDNS sees it:
ID, SG, US, DE). Continents are:
Health checks
--test) runs one check without saving.
The state shows:
- next to the record in the zone, as a green or red dot on its steering badge,
- on the topology map, as an Origin node per steered address,
- in
dnz record steering example.com.
health check failing: left out of DNS answers).