Service discovery
Service discovery is the process by which applications or components locate available services and obtain the network endpoints or connection information needed to access them.
Building Distributed Applications that Work
Service discovery is a mechanism by which services locate the network endpoints of other services dynamically rather than relying on fixed addresses.
- How it is used
- Lets Aspire-hosted services call one another by registered name instead of manually configured network addresses.
- How deep it goes
- Defines registration and querying, then implements named HTTP calls and integration workarounds; does not detail registry internals.
- Examples
- Uses a storefront calling an API, a SignalR order-tracking hub, an Ollama container, and identity-provider redirects.
- What you can do after
- Apply it via Aspire service defaults to configure named HTTP calls and recognize when an integration needs a standard URL or custom handler.
Read how Building Distributed Applications that Work explains service discovery →
Microservices Patterns, Second Edition
Service discovery is a mechanism that lets services find and communicate with service instances without hardcoded network locations.
- How it is used
- Locates service instances for synchronous remote procedure invocation without hardcoded network locations.
- How deep it goes
- Explains registry updates and request routing, and compares application-level with platform-provided discovery.
- Examples
- Uses a REST service with dynamically assigned instance locations and illustrates platform registration and routing.
- What you can do after
- Evaluate discovery approaches by weighing platform simplicity against application-level support for multiple deployment platforms.
Read how Microservices Patterns, Second Edition explains service discovery →
Spring Microservices in Action
The process by which a service consumer locates an available service instance without knowing its physical network location in advance.
- How it is used
- Uses service discovery to locate changing microservice instances by logical name and support horizontal scaling.
- How deep it goes
- Works through registration, lookup, client-side caching, load balancing, and three service invocation mechanisms.
- Examples
- Uses licensing and organization services, including two registered organization instances, to demonstrate discovery and client-side load balancing.
- What you can do after
- Apply it via Spring Cloud and Eureka, using Ribbon-backed clients to locate services and balance calls.
Read how Spring Microservices in Action explains service discovery →
Kubernetes for Developers
Service discovery is the process of locating available services and their network endpoints within a distributed system.
- How it is used
- Uses Kubernetes Services to connect applications without embedding changing cluster IP addresses in deployment or application code.
- How deep it goes
- Explains DNS and environment-variable mechanisms, scope, ordering, and restart implications, but does not detail DNS internals.
- Examples
- Demonstrates timeserver-to-robohash calls through DNS, environment variables, Deployment YAML, and kubectl inspection.
- What you can do after
- Apply it via Kubernetes DNS names or Service environment variables to configure portable inter-application calls.
Read how Kubernetes for Developers explains service discovery →
Kubernetes in Action, Second Edition
Service discovery is a mechanism by which applications locate other applications or services and obtain the information needed to use them.
- How it is used
- Delegates application and peer lookup in distributed applications to Kubernetes infrastructure.
- How deep it goes
- Defines the mechanism and its application role, but stops short of implementation steps, configuration, and lookup internals.
- Examples
- Uses service and peer discovery within a distributed application as its concrete application context.
- What you can do after
- Apply it via Kubernetes by relying on platform-provided discovery instead of implementing infrastructure mechanisms inside applications.
Read how Kubernetes in Action, Second Edition explains service discovery →
Machine Learning Platform Engineering
Service discovery is the automatic identification of available application services and their network locations.
- How it is used
- Connects newly deployed Kubernetes applications to Prometheus scraping for operational monitoring.
- How deep it goes
- Explains pod annotations, metrics endpoints, target verification, and querying, without detailing the discovery mechanism’s internals.
- Examples
- Uses a FastAPI /metrics endpoint, Kubernetes scrape annotations, Prometheus targets, and Grafana request time series.
- What you can do after
- Operate/configure Prometheus to discover annotated application pods and verify that their metrics are scraped.
Read how Machine Learning Platform Engineering explains service discovery →
Platform Engineering on Kubernetes
Service discovery is the mechanism by which services locate and communicate with one another through stable names instead of changing network addresses.
- How it is used
- Connects services inside a Kubernetes cluster without requiring callers to track changing pod addresses.
- How deep it goes
- Defines Kubernetes Services as routing and load-balancing abstractions, but defers detailed resource management.
- Examples
- Uses the Conference application, Kubernetes Services, service names, replicas, and changing pod IP addresses.
- What you can do after
- Operate/configure Kubernetes Services so applications address replicas through stable names instead of pod IP addresses.
Read how Platform Engineering on Kubernetes explains service discovery →
Designing AI Systems
Service discovery is the mechanism by which distributed components locate available services and their connection endpoints.
- How it is used
- Routes internal service calls through a gateway that discovers healthy replicas and centralizes traffic control.
- How deep it goes
- Explains registry-based routing, health checks, scaling, and deployment behavior, but stops short of implementation code.
- Examples
- Uses a mobile-to-gateway request, workflow calls, Session Service replicas, and zero-downtime container replacement.
- What you can do after
- Evaluate how gateways route requests, scale services independently, and update traffic safely during deployments.
Quarkus in Action
A service discovery mechanism dynamically locates the network address of a service in a distributed system.
- How it is used
- Decouples service locations from application configuration in dynamically changing cloud deployments.
- How deep it goes
- Explains dynamic discovery, Kubernetes Services, Stork alternatives, and load balancing, but defers detailed Stork configuration.
- Examples
- Uses Kubernetes service names, pod groups, service proxies, and Stork mechanism choices as concrete examples.
- What you can do after
- Operate/configure service connections through Kubernetes names or select a Stork-backed discovery mechanism.
Learn Docker in a Month of Lunches, Second Edition
Service discovery is the technique of dynamically locating a service and obtaining the network address needed to communicate with it.
- How it is used
- Uses DNS-based names to connect Docker Compose containers despite changing container IP addresses.
- How deep it goes
- Explains Docker DNS, network resolution, scaling behavior, and verification commands without descending into DNS internals.
- Examples
- Demonstrates scaled iotd and accesslog services through nslookup inside the image-gallery web container.
- What you can do after
- Operate/configure Docker Compose services and verify name-based connectivity with nslookup.
Read how Learn Docker in a Month of Lunches, Second Edition explains service discovery →
Also covered in
- gRPC Microservices in Go
- Acing the Certified Kubernetes Administrator Exam, Second Edition
- Google Anthos in Action
- Build and Orchestrator in Go (From Scratch)
What to know first
- distributed systemA distributed system is a computing system whose components run across multiple networked processes or machines and coordinate through communication.
- microservice architectureMicroservice architecture is a software architectural style that structures an application as independently deployable services, typically organized around focused capabilities and communicating through defined interfaces.
- domain name systemThe Domain Name System (DNS) is a distributed, hierarchical naming system that resolves domain names to IP addresses and other network resource records.
- gRPCgRPC is an open-source remote procedure call framework for defining services and invoking them across process or network boundaries, commonly using Protocol Buffers and HTTP/2.
Related concepts
- HTTP clientuses · An HTTP client is software that constructs and sends HTTP requests and receives and processes the corresponding responses.
- Prometheusused by · Prometheus is an open-source monitoring and alerting system that collects, stores, and queries labeled time-series metrics.
- application-level service discoveryincludes · Application-level service discovery is service discovery implemented by application services and clients interacting with a dedicated service registry.
Questions about service discovery
What is service discovery?
Service discovery is the process by which applications or components locate available services and obtain the network endpoints or connection information needed to access them.
Which Manning books explain service discovery?
Building Distributed Applications that Work, Microservices Patterns, Second Edition, Spring Microservices in Action, Kubernetes for Developers, Kubernetes in Action, Second Edition, Machine Learning Platform Engineering, Platform Engineering on Kubernetes, Designing AI Systems and 2 more.
What should I know before learning service discovery?
Manning books that teach service discovery usually introduce distributed system, microservice architecture, domain name system and gRPC first.
What kinds of service discovery are there?
Kinds of service discovery include application-level service discovery.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.









