mediumSenior Backend EngineerTechnology
What is service discovery and how do microservices find each other?
Posted 18/04/2026
by Mehedy Hasan Ador
Question Details
"Service A needs Service B, but B's IP changes on every deploy."
Suggested Solution
Options
Kubernetes DNS (simplest): Services get stable DNS names.kind: Service
metadata: { name: payment-service }
Other pods call: payment-service:3000
Service Mesh (Istio): Sidecar proxy handles routing, retries, load balancing.fetch("http://payment-service/charge"); // Sidecar intercepts → routes → retries