Skip to content

Traffic Globe: Where Your Queries Actually Come From

License: paid tier and above. See Licensing. Requires: a GeoIP country database configured (the same one latency/geo-ip routing already uses — see the geoip: block in [config.yaml.example and Configuration if you haven't set this up yet). Without it, the map has nothing to show.

A world map showing where your DNS queries originate, colored by volume, with animated arcs to the members actually serving them. It's a genuine ops tool (click a country to see its top source subnets and which members answer for it) and also, frankly, a great screenshot for making "global server load balancer" feel tangible instead of abstract.

What It Shows

  • Heatmap — each country is shaded by query volume accumulated since UTC midnight today (darker = more queries). Countries with no traffic today are shown as a neutral "no data" fill, not the bottom of the color scale — zero traffic and no-data-yet are different things.
  • Animated arcs — a moving dot travels from each origin country toward the country hosting the member(s) that served it. The destination is derived the same way the origin is (a GeoIP lookup on the member's IP), so there's no separate region-to-coordinates table to maintain.
  • Layers — besides served traffic, the globe can show four other things that happen to queries, each with its own colour. Toggle them with the chips above the map (each chip also shows today's total, and a line under the chips names the top countries per layer):
Layer Colour What it counts
Served blue Answered by a steered member (the arcs)
Blocked red Refused or dropped by an enforced client block rule; dry-run rules do not appear (those queries were answered)
Misses violet NXDOMAIN, NODATA, or REFUSED for a name outside every zone served — a country that is mostly misses is usually scanning
Rate limited amber Shed by response rate limiting or the licence request limit
Records green Answered from records or a referral (static, secondary, delegation, DNSKEY), not by a member

A country is filled with the layer it is most remarkable for (its share of that layer's maximum), so a quiet country with a flood of misses shows violet rather than disappearing behind a big served count. Blocked countries also get a red outline and a pulsing circle; rate-limited ones a pulsing amber diamond, so colour is never the only cue. Only served traffic has arcs. Every layer is counted separately: none of them is part of the served query total. - Click a country — see its total query count, which members served it (with pool/region context) and how many queries each handled, a stacked bar of everything that happened to its queries, and its top source subnets (bucketed to /24 for IPv4 / /48 for IPv6 — the same granularity RUM routing already uses, so no raw client IP is ever displayed).

Viewing It

WebUI: /traffic in the main nav (Fleet section).

gslbctl:

gslbctl traffic geo

API:

curl https://<api-host>:<port>/api/v1/traffic/geo -H "Authorization: Bearer $TOKEN"

How It's Built

No new database table and no per-query write: an in-memory accumulator keyed by country, reset at UTC midnight — no per-node/cluster-wide history beyond today (Prometheus is the tool for longer retention). A GeoIP lookup is a fast in-memory MaxMind read (not network I/O), so recording an entry adds no meaningful latency to the query path.

Counts reset on a gslbd restart, same as they always did — today's total just resets to zero and starts accumulating again, rather than losing at most a minute of data the way the old rolling window did.

The map is a d3-geo orthographic projection rendered as plain SVG — a draggable rotating globe, not a flat map, and not a 3D WebGL scene either (no three.js/react-globe.gl; an orthographic projection just makes flat SVG geometry look like a sphere from one angle at a time). Drag anywhere on it to rotate; countries and routing arcs on the far side clip out at the horizon automatically (d3-geo's clipAngle(90)) and reappear as you rotate them back into view. Country borders come from a bundled low-resolution world atlas (~100KB); there's no runtime dependency on an external map tile service, so this works in air-gapped deployments like the rest of the product.

Notes

  • Per-country member and source-subnet breakdowns are each capped at 50 tracked entries — under a flood from many distinct source subnets, the country's total count keeps incrementing correctly, it just stops growing a row for every single new subnet. Real pool sizes are far below this cap, so member breakdowns are effectively never truncated.
  • Very occasionally, at specific rotation angles, a country near the horizon can render with a small self-crossing notch instead of its clean coastline — a known robustness limitation in d3-geo's adaptive clipping for simplified topology right at the clip boundary, not specific to this app (confirmed worse, not better, on the higher-resolution 50m atlas — not something worth chasing further). Country fills use fill-rule="evenodd" specifically to keep this cosmetic (an unfilled gap) rather than a solid extraneous shape; it doesn't fix the underlying geometry, just how visible the artifact is when it happens.
  • Routing arcs are sampled along the true great-circle path between origin and destination (d3.geoInterpolate), so — unlike the original flat-map version — there's no more "long way round the Pacific" artifact. An arc is only drawn while both its endpoints are on the hemisphere currently facing the viewer; it doesn't try to animate a dot along a path that's rotated out of view.
  • Not a Terraform-managed resource — like the Query Tracer and Config Snapshots, this is diagnostic/observability data, not something you declare.