Back to Catalog
Cloud
Behavioral
Service Discovery
Enable services to discover and communicate with each other
Intent & Description
The Service Discovery pattern enables services to discover and communicate with each other within a Kubernetes cluster. Kubernetes provides built-in service discovery through DNS and environment variables. Services can discover each other using stable service names, and Kubernetes handles load balancing across pod instances.
Real-world Use Case
Use when services need to discover and communicate with each other or when you want built-in load balancing and service registry.
Source
Advantages
- Built-in service discovery
- Automatic load balancing
- Stable service names
- No additional infrastructure required
Disadvantages
- Limited to cluster-internal communication
- DNS resolution delays
- Requires service configuration