DevOps
Intermediate
What is Service Discovery?
A mechanism that automatically detects and tracks the network locations of service instances in distributed systems.
In dynamic environments where service instances are constantly created and destroyed, service discovery eliminates hardcoded addresses. Services register themselves when starting and deregister when stopping. Clients query the discovery system to find available instances. Tools include Consul (HashiCorp), etcd, ZooKeeper, and DNS-based discovery in Kubernetes. Client-side discovery (the client picks an instance) and server-side discovery (a load balancer routes requests) are the two main patterns. Service discovery is foundational for microservices architectures and container orchestration.