What is Service Discovery
Automatic service discovery
Service Discovery — a mechanism for automatic discovery and registration of services in distributed systems and microservice architecture.
Core concepts
- Service Registry — centralized service registry
- Registration — automatic registration at startup
- Heartbeat — service availability check
- Deregistration — removal on shutdown
- DNS-based — discovery through DNS records
Patterns
- Client-side discovery — client finds the service itself
- Server-side discovery — load balancer finds the service
- Self-registration — service registers itself
- Third-party registration — external agent registers
Popular solutions
- Consul — HashiCorp, service mesh
- Eureka — Netflix, for Spring Cloud
- etcd — key-value store with discovery
- Kubernetes — built-in DNS and Services
- Zookeeper — Apache, distributed coordination
Applications
- Microservices — inter-service communication
- Load balancing — traffic distribution
- Health checking — state monitoring
- Configuration — centralized configuration
- Failover — automatic switching on failures