How abh/geodns works
GeoDNS is an authoritative DNS server for geographically targeted responses. Its main path is DNS client request → server dispatch → zone label selection using client IP/ECS and geographic targeting → DNS response; zones are loaded and refreshed from JSON files. The graph also preserves the documented HTTP/Prometheus interface, query logging, and health checks. Edges are limited to calls visible in excerpts or relationships explicitly documented in the README; unsampled subsystem internals are represented only where their source paths are supported.
Main entry points: geodns.go Process bootstrap · serve.go Request resolution · server.go DNS listener and mux · muxmanager.go Zone reload manager
Components 21
DNS runtime
- Process bootstrap
geodns.go - DNS listener and mux
server/server.go - Request resolution
server/serve.go - EDNS handling
edns/edns.go
Zone management
- Zone selection
zones/zone.go - Zone file parser
zones/reader.go - Zone reload manager
zones/muxmanager.go - Record picker
zones/picker.go
Geo targeting
- Target calculation
targeting/targeting.go - GeoIP provider
targeting/geoip2/geoip2.go - Geo provider API
targeting/geo/geo.go
Operations
- Health testing
health/healthtest/healthtest.go - Health test types
health/healthtest/healthtesters.go - Health status
health/status.go - Query logging
querylog/querylog.go - Avro output
querylog/avro.go - HTTP interface
http.go - Prometheus metrics
server/server.go - Runtime configuration
appconfig/appconfig.go
Other components
- DNS client
- GeoIP databases
Connections 24
- DNS client → DNS listener and mux: sends query
README.md - DNS listener and mux → Request resolution: dispatches
server/server.go - Request resolution → EDNS handling: checks EDNS
server/serve.go - Request resolution → Zone selection: selects records
- Request resolution → Target calculation: gets targets
server/serve.go - Target calculation → Geo provider API: looks up location
targeting/targeting.go - Geo provider API → GeoIP provider: implemented by
- GeoIP provider → GeoIP databases: reads databases
- Process bootstrap → DNS listener and mux: starts
geodns.go - Process bootstrap → Zone reload manager: starts reloads
geodns.go - Zone reload manager → Zone file parser: parses zones
- Zone reload manager → DNS listener and mux: registers zones
zones/muxmanager.go - Zone selection → Record picker: selects records
- Process bootstrap → GeoIP provider: initializes provider
geodns.go - Process bootstrap → Runtime configuration: reads settings
geodns.go - Process bootstrap → Query logging: configures logger
geodns.go - Request resolution → Query logging: records queries
server/serve.go - Query logging → Avro output: writes Avro
- Request resolution → Health testing: serves health answers
server/serve.go - Health testing → Health test types: uses testers
- Health testing → Health status: updates status
- Process bootstrap → HTTP interface: starts interface
geodns.go - HTTP interface → Prometheus metrics: serves metrics
http.go - DNS listener and mux → Prometheus metrics: records counters
server/server.go