Interview Prep/Networking/DNS & Service Discovery

How do you choose between DNS, Consul and Kubernetes services for microservice discovery?

AdvancedScenarioDNS & Service Discovery
Answer

Situation read → Each solves discovery at a different level of dynamism.

What I'd do →

  1. Use Kubernetes Services and CoreDNS inside a cluster: svc.namespace.svc.cluster.local
  2. Use Route 53 or an internal DNS for stable cross-cluster entry points
  3. Use Consul or a service mesh when you need cross-platform discovery (VMs and pods), health-aware routing and mTLS
  4. Keep the lowest layer that works, because every extra control plane is an outage source

Why → DNS is simple and universal but slow to change; registries react in seconds but need agents.

Interview tip → Say you avoid building discovery that platform already provides.

All Networking questions Roadmap: Networking for DevOps

More on DNS & Service Discovery