Skip to content

Instantly share code, notes, and snippets.

@drewr
Created August 4, 2026 20:48
Show Gist options
  • Select an option

  • Save drewr/a82d6ee8e8fbe0a2c6c2902288f79ada to your computer and use it in GitHub Desktop.

Select an option

Save drewr/a82d6ee8e8fbe0a2c6c2902288f79ada to your computer and use it in GitHub Desktop.

DNS Service — Production Readiness Gap Analysis

Analysis of the Datum Cloud DNS service (dns-operator) for production readiness, combining an infra-deployment survey, peer service comparison within the platform, and Google SRE production-readiness standards from the SRE books and CRE launch checklist.


Current State

The DNS operator has:

  • Service catalog registration: Service resource published, ServiceConfiguration planned (Phase 2, issue #44)
  • IAM: ProtectedResources for all 4 CRDs, admin/viewer RBAC roles, GCS bucket IAM for LightningStream
  • Kustomize overlays: production/staging for control-plane, downstream/agent, storage; edge variant for the DaemonSet
  • Metrics scraping: PodMonitors for pdns-auth and the managed DaemonSet; Vector metrics gateway for edge
  • Resource metrics policy: dns-metrics.yaml generating Prometheus gauges for zones and record sets
  • E2E dashboard: Grafana dashboard tracking Chainsaw test results for DNS setup
  • CRDs: 4 resources under dns.networking.miloapis.com/v1alpha1
  • CI/CD: GitHub Actions for test, lint, publish (Docker + Kustomize bundle), and e2e (3-cluster kind)
  • Architecture docs: topology, replication model, API reference, PowerDNS backend, troubleshooting guide
  • BGP advertisement: CiliumBGPAdvertisement for both auth-dns and managed-dns LoadBalancer IPs

Part 1: Gaps vs. Existing Platform Services

Compared to the most mature platform services (ipam-system, billing-system, activity-system, graphql-gateway).

Category Status What's Missing Peer Reference
ServiceConfiguration (billing/quota) ⚠️ Planned ServiceConfiguration defining MonitoredResourceTypes, metrics, and billing routing. Tracked in issue #44. ipam-system, billing-system, activity-system, search-system all have one
PrometheusRules / Alerts ❌ Missing Zero DNS-specific alerts (no DNSSyncSlow, PowerDNSDown, LightningStreamStalled, etc.) graphql-gateway has nso-alerts.yaml; network-services-operator has alerts
NetworkPolicy ❌ Missing No ingress/egress restrictions on the DNS control plane or agent pods ipam-system, billing-system, network-services-operator
GrafanaDashboard (operational) ❌ Missing No DNS operational dashboard (query volume, zone transfer status, agent health, PowerDNS metrics) activity-system, billing-system, datum-iam-system, ipam-system
README / docs in infra repo ❌ Missing No README in apps/dns-operator/ explaining deployment layout, components, or how to operate it 9 of 46 apps have READMEs
Crossplane resources ❌ Missing GCS bucket for LightningStream uses raw k8s resources instead of Crossplane Composition ipam-system, backstage, datum-iam-system, etc.
Runbooks (alerts pages) ❌ Missing No docs/runbooks/dns/ directory. Every other subsystem (karmada, kubelet, flux, bgp, envoy, cnpg, billing, victoriametrics, workload-memory) has one. Entire docs/runbooks/ README documents the convention
Rate limiting / WAF for DNS ❌ Missing Platform has Envoy rate-limiting and Coraza WAF for HTTP, but UDP/TCP 53 is uncovered tests/construct/networking/rate-limiting/ + WAF tests exist for HTTP
DNSSEC ❌ Missing Neither PowerDNS nor Knot DNS has DNSSEC configured Not configured anywhere in infra
Incident response ❌ Missing No on-call rotation, escalation path, or incident response procedure defined for DNS Billing, Karmada, and others have documented runbooks

Part 2: Gaps vs. Google SRE Production Readiness Standards

Based on the Google SRE book, SRE workbook, and CRE (Customer Reliability Engineering) launch checklists.

2.1 Monitoring & Alerting

Requirement Status Gap
Symptom-based (not cause-based) alerts No alerts at all
Only 3 output types: pages, tickets, logs Not categorized
Alert thresholds aligned with SLOs No SLOs defined
Every paging alert has a runbook No runbooks
Black-box monitoring (end-to-end) No synthetic DNS query monitoring from outside
White-box monitoring (internal state) ⚠️ Partial Resource metrics exist but no controller health alerts
Pages immediately actionable Nothing pages
Maximum 2 incidents per on-call shift No on-call defined
Monitoring the monitoring Not addressed
Dashboards link to playbooks; playbooks link to consoles No playbooks exist

2.2 SLIs, SLOs, Error Budgets

Requirement Status Gap
SLIs defined in user-centric terms (measure at client, not server) Not defined
SLOs published (specific availability/latency targets) Not published
Error budget policy defined and enforced Not defined
SLO document signed off by dev + SRE Not written
SLO-burn-rate alerting Not implemented

Suggested initial SLOs (common for authoritative DNS services):

  • Availability: 99.99% of DNS queries to the serving layer succeed (non-SERVFAIL, non-NXDOMAIN for existing records)
  • Latency P99 (global): <50ms for recursive resolution
  • Propagation freshness: zone changes replicated to all edges within 120s (P99)
  • Zone programming: DNSZone/DNSRecordSet reaches Programmed=True within 60s of creation

2.3 Capacity Planning

Requirement Status Gap
Load test completed at max acceptable latency No load testing framework exists
Capacity forecast for 6 months out Not documented
End-to-end perf test under projected peak (15-25x normal) Not done
Storage capacity verified (LMDB, logs, backups) Not documented
N+2 redundancy No DR plan for total DNS-serving failure
Spare capacity for 10x growth No growth model
Documented max zones/nodes/records/QPS Not published
Autoscaling policy for PowerDNS/recursor edge nodes Not defined

2.4 Failure Modes & Resilience

Requirement Status Gap
Behavior documented per failure mode: machine dies, rack fails, DC offline, network split Not documented
Graceful degradation defined per dependency Not defined
Exponential backoff WITH jitter on all retries ⚠️ Partial Controller-runtime has rate limiting but not all retries have jitter
Load shedding implemented (reject early in overload, serve degraded) PowerDNS has no documented load shedding for overload
Request deadlines/timeouts to prevent resource exhaustion Not validated
Data backup/restore tested ⚠️ Partial LightningStream syncs LMDB to GCS, but restore procedure undocumented
Disaster recovery plan documented and drilled Not documented
"Fail sanely" on bad input (continue operating on previous state + alert) Not validated

Known failure mode: Orphaned downstream records (documented in docs/troubleshooting/dnsrecordset-downstream-orphan.md). The replicator can miss upstream deletions during restarts or timing gaps, leaving stale records in PowerDNS indefinitely. This caused a real incident (www.ab.dk stuck for ~24 hours). The replicator has no post-discovery mechanism for orphan cleanup.

2.5 Change Management & Release Process

Requirement Status Gap
Non-emergency rollouts proceed in stages No canary/release-channel mechanism for DNS
Canary first: deploy to small % then observe No canary deployment config
Staged rollouts across geographies No staged rollout
Rollback capability (roll back first, diagnose second) ⚠️ Partial Flux can revert Kustomization, but LRRT is unknown
Feature flags for toggling features independently of binaries No feature flags
Rollouts supervised (monitoring watching for regressions) ⚠️ Partial CI passes but no post-deploy monitoring
Releases cut on separate release branches Not observed
All code AND config in version control GitOps via Flux

2.6 Incident Response

Requirement Status Gap
Incident Command System with defined roles Not defined for DNS
Clear escalation paths documented Not documented
Declare incidents early (not "debug via bug tracker") No incident criteria defined
Playbooks/runbooks for every alert type No alerts → no runbooks
Postmortems required: blameless, with tracked action items No postmortem process for DNS
Practice incident response with drills Not done
Generic mitigations available: rollback, traffic drain, feature flag disable No generic mitigations documented
LRRT (Last Resort Remediation Time) known Not measured

2.7 On-Call

Requirement Status Gap
Minimum 8 people in rotation Rotation not defined
On-call training before first shift No training material
Handoff documentation between shifts Not documented
Tiers defined: P1 (pages), P2 (tickets), P3 (info) Not defined
SRE ≤50% operational work, ≥50% engineering Not measured

2.8 Security & Abuse Prevention

Requirement Status Gap
Security design review completed Not documented
Rate limiting and quotas to prevent DoS/abuse UDP/TCP 53 has no rate limiting; no per-tenant query quotas
DNSSEC (data origin authentication) Not configured
DDoS amplification prevention DNS UDP is amplifiable; no mitigation documented
Input validation: reject implausible configs ⚠️ Partial Webhook validates record sets; API boundary untested
Auth, authorization, TLS configured ⚠️ Partial Webhook TLS via cert-manager; metrics TLS; no mTLS between replicator components
Abuse/spam risk assessed Not assessed
Prelaunch access control and visibility restrictions Not defined

2.9 Disaster Recovery & Data Integrity

Requirement Status Gap
RPO/RTO targets documented Not documented
Backup/restore procedure documented and tested Not documented
DiRT (Disaster Recovery Testing) performed Not done
Multiple datacenters/regions for redundancy ⚠️ Partial Edge clusters exist but DR failover undocumented
Plan for simultaneous planned + unplanned outage Not documented

2.10 Client Behavior

Requirement Status Gap
Client backs off exponentially on failure (with jitter) Not validated for external-dns-webhook or other DNS clients
Automatic requests jittered (no thundering herd) No documented jitter strategy for reconciliation
Server-side client configuration (feature flags, sync intervals) No feature flag infrastructure
Can control client behavior remotely Not implemented

2.11 Dependencies

Requirement Status Gap
All dependencies identified ⚠️ Partial PowerDNS, LightningStream, RustFS/GCS identified; deeper chain not mapped
Failure mode per dependency documented Not documented
Graceful degradation defined when each dependency fails Not defined
Request flow documented end-to-end ⚠️ Partial Architecture diagrams exist; C4 container view available

Part 3: Complete Production-Readiness Checklist

Combined checklist of every item needed for production readiness, grouped by category.

3.1 Billing & Metering

  • Publish ServiceConfiguration with MonitoredResourceTypes (zones, record sets, queries)
  • Define MeterDefinition for billing dimensions (per-zone, per-record, per-query, per-secondary-DNS-zone)
  • Implement usage emission from the operator or backend
  • Define tiered pricing model (free tier limits, paid tiers)
  • Implement resource quota enforcement per tenant (maxZones, maxRecordsPerZone, etc.)
  • Rate-limit API usage per tenant (control-plane request throttling)
  • Implement query-level rate limiting on authoritative servers (per-source-IP or tenant)

3.2 Observability & Alerting

  • Deploy PrometheusRules for DNS service health:
    • DNSReconcileErrors — controller-runtime error rate > threshold
    • DNSReplicationLagHigh — control-plane → edge sync freshness > 120s
    • PowerDNSDown — PowerDNS API unreachable
    • LightningStreamSyncFailing — LMDB→GCS sync errors
    • DNSServeStale — authoritative data older than expected
    • DNSZoneCountAnomaly — sudden spike/drop in zone count
    • DNSRecordCountAnomaly — sudden spike in record failures
    • DNSSlowQueries — PowerDNS query latency > threshold
    • DNSOperatorMemoryHigh / DNSOperatorRestarting
  • Create runbook for each alert (in docs/runbooks/dns/)
  • Deploy black-box monitoring: synthetic DNS queries from outside the cluster
  • Deploy Grafana operational dashboard (query volume, latency, zone counts, replication freshness)
  • Define SLIs and publish SLOs (availability, latency P99, propagation freshness)
  • Implement SLO-burn-rate alerting
  • Monitor the monitoring (alertmanager health, metrics pipeline health)

3.3 Incident Response & On-Call

  • Define on-call rotation for DNS (minimum 8 people)
  • Create escalation paths (P1 → on-call, P2 → next business day, P3 → backlog)
  • Write incident response runbook with ICS roles
  • Define incident declaration criteria (e.g., "DNS queries failing from >1 edge location for >5min")
  • Practice incident drills (quarterly "Wheel of Misfortune")
  • Conduct blameless postmortems with tracked action items
  • Implement status page integration for customer-facing DNS health

3.4 Security

  • Configure DNSSEC on PowerDNS and Knot DNS
  • Implement rate limiting on UDP/TCP 53 (per-source-IP, per-zone)
  • Document DDoS mitigation strategy (BGP RTBH, Anycast, traffic scrubbing)
  • Implement mTLS between replicator and downstream agent
  • Security design review for DNS control-plane API
  • Input validation fuzzing for DNSRecordSet/DNSZone acceptance
  • Document abuse prevention mechanisms

3.5 Capacity Planning & Scalability

  • Conduct load testing: max queries/sec per PowerDNS node, max zones, max records
  • Publish documented capacity limits (max zones per cluster, max records per zone, max QPS per edge node)
  • Create capacity forecast model (6-month projection based on growth rate)
  • Implement autoscaling for PowerDNS/recursor edge nodes
  • Benchmark LightningStream propagation latency under load
  • Test simultaneous data-center failure (can remaining edge nodes absorb traffic?)
  • Test simultaneous planned + unplanned outage (N+2 scenario)

3.6 Change Management & Release

  • Implement canary deployment for DNS operator versions
  • Implement staged rollouts across edge locations
  • Define feature flag mechanism for toggling operator features independently of binary release
  • Document exact rollback procedure (kubectl apply previous, Flux revert, LRRT)
  • Measure LRRT (how long from decision to revert to traffic restored)
  • Release branch strategy for hotfixes vs. normal releases
  • Post-deploy monitoring window (watch dashboards/alerts for 30min after every release)

3.7 Disaster Recovery

  • Document RPO and RTO targets for DNS service
  • Document and test LMDB restore procedure from GCS (LightningStream recovery)
  • Test failover from one edge cluster to another
  • Document procedure for total DNS rebuild (create PowerDNS, sync from GCS, update BGP)
  • Practice DR drill quarterly
  • Document procedure for handling TLD/registrar issues (domain expires, registrar unresponsive)

3.8 Customer-Facing (Go-to-Market)

  • Publish pricing page (free tier: X zones, Y records, Z queries/month)
  • Publish SLA commitment (availability %, credits for breaches)
  • Publish API deprecation policy (how long v1alpha1 is supported, migration path)
  • Create self-service signup flow (not just kubectl)
  • Write getting-started guide (5-minute quickstart)
  • Write migration guides from Route53, CloudDNS, Azure DNS, etc.
  • Publish customer-facing changelog and release notes
  • Create status page (or integrate with existing) for DNS-specific outages
  • Define data portability (export all zones/records as zone files or Terraform HCL)

3.9 Developer & Agent Experience

  • Build Terraform/Crossplane provider for DNS resource management
  • Build CLI plugin for common operations
  • Create UI/portal integration for DNS management (create zone, add records, view status)
  • Expose DNS Zone Discovery results in the portal (live DNS queries visible to users)
  • Create SDK or API client library if direct API access is supported
  • Document the customer's SLA/SLO expectations and how to monitor their own DNS

3.10 Known Technical Debt

  • Fix orphaned downstream record gap (replicator should reconcile shadow existence upstream periodically, not just on watch events)
  • Define programmatic interface for zone ownership accounting (ConfigMap is fragile — consider a CRD or a lock per zone)
  • Add end-to-end circuit breakers for PowerDNS API calls (avoid cascading failures)
  • Add cross-cluster health checking (replicator should detect downstream cluster unavailability and surface Programmed=False with appropriate reason)
  • Document the replication freshness budget (how stale can a shadow be before it's worth alerting)

Key Principles From Google SRE

  1. Measure at the user, not the server — Gmail's perceived availability jumped 0.9% just by switching measurement to client-side. DNS should measure from recursive resolvers, not just from PowerDNS internal stats.
  2. "Fail sanely" — On bad input, continue operating on previous valid state AND alert. Never accept empty/partial config that would cause a full outage. (Example: if LightningStream returns an empty snapshot, don't replace the LMDB with an empty database.)
  3. "Roll back first, diagnose second" — Minimize MTTR. Document the exact rollback command and measure how long it takes.
  4. Error budgets resolve dev vs. SRE tension — Define one. When the budget is spent, releases freeze until reliability is restored.
  5. No email-only alerts — They are "the moral equivalent of piping to /dev/null." Every alert must page or be a dashboard panel.
  6. Maximum 2 incidents per on-call shift — If DNS pages the on-call more than twice per 12-hour shift, prioritize fixing the pager load before adding features.
  7. 50% project time cap — If >50% of operational work is toil (manual intervention, firefighting), the service isn't production-ready. Automate or eliminate the toil.
  8. The CRE launch checklist — Before a service can serve production traffic: (a) signed SLO document, (b) monitoring & alerting linked to SLOs, (c) incident response plan, (d) documented rollback procedure, (e) capacity tested, (f) security reviewed.

Summary

Your 5 original categories (Billing, Observability, Developer/Agent Experience, Documentation, Performance) cover ~60% of what's needed. The biggest gaps in your list:

Missing Category Urgency Why
Alerting + runbooks Critical You cannot operate without on-call pages. Every other subsystem has them.
SLOs + error budgets Critical You cannot measure or defend reliability without targets.
Security (DNSSEC, rate limiting, DDoS) High DNS is trivially amplifiable; customers can't trust unsigned responses.
Incident response + on-call High Who gets paged at 3am and what do they do?
Capacity planning + load testing High You have no idea how much traffic the system can handle.
Disaster recovery Medium LightningStream gives you GCS backups but no tested restore procedure.
Network policy Medium DNS control plane and agents have no network restrictions.
Go-to-market material Medium Pricing, SLA, migration guides, self-service flow.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment