Your AI feature probably looks great in a demo. The chatbot answers cleanly. The retrieval step works on a happy-path dataset. The orchestration layer seems fine when one engineer runs everything locally.
Then staging happens. A request hits your API, the orchestrator tries to call embeddings, embeddings tries to reach the vector layer, and somewhere in the chain you get a vague service unavailable error. The model is not the problem. Your network of services can't reliably find one another.
That's why microservices service discovery matters far more than most product teams expect. A production AI system is not one model endpoint. It's a moving set of APIs, workers, gateways, queues, caches, and data services that scale, restart, fail, and relocate. If those services do not have a reliable way to locate healthy peers, your shiny AI feature is dead in the water.
Table of Contents
- Your AI Is Only as Reliable as Its Services Are Findable
- Why You Cannot Just Use IP Addresses Anymore
- Two Paths to Discovery Client-Side and Server-Side
- The Registry Is Your System's Phone Book Pick a Good One
- What Happens When Your Discovery Fails During an Inference
- The Real Question Should You Manage a Registry or Use the Platform
- Your Checklist for Migrating to a Discovery-Powered System
Your AI Is Only as Reliable as Its Services Are Findable
A founder sees the chat experience working and assumes the hard part is done. It isn't. The hard part starts when the AI feature has to survive real traffic, rolling deployments, worker restarts, and dependency failures.
Take a common setup. Your app has an API gateway, an auth service, an orchestration service, a retrieval worker, a vector database interface, a cache, and an LLM adapter. That is already enough moving parts for one broken address assumption to bring down the whole request path.
A model is not a system. A system is a chain of services.
In microservices, service discovery is commonly handled through a central registry that services register with so clients can resolve the current location of an instance instead of hardcoding where it lives. That matters because instances scale, fail, and move continuously, which is the actual reason discovery exists in the first place, as explained in Solo.io's overview of microservices service discovery.
The production failure usually looks boring
Nobody opens the incident report and says, “our service discovery strategy was weak.” They say:
- The API timed out because the orchestrator kept trying an endpoint that no longer existed.
- Retrieval became flaky because one service restarted and another kept stale connection details.
- Inference looked unstable because the cache, reranker, or vector layer disappeared between autoscaling events.
That is what makes this problem expensive. It hides behind generic symptoms.
Your AI feature can't be trusted if the services around it can't reliably locate healthy dependencies.
There's another layer here for teams building agentic systems. If your pipeline depends on document ingestion, parsing, indexing, and retrieval, the content itself also needs to be structured for machine access. A useful companion read is Dokly's piece on strategies for AI agent doc parsing, because discoverable services and discoverable content are two halves of the same production problem.
The real consequence
If service lookup is brittle, every other improvement lands on shaky ground. Better prompts won't save you. A faster model won't save you. More GPUs definitely won't save you.
Your users only see one thing. The feature works, or it doesn't.
Why You Cannot Just Use IP Addresses Anymore
Hardcoding network locations used to be tolerable when infrastructure stayed put. That world is gone. Modern application platforms replace instances, reschedule workloads, and scale services without asking your config file for permission.

Static addresses belonged to a different era
With older deployments, you could get away with a spreadsheet mindset. App A calls App B at a fixed location. If you changed that location, an engineer updated configuration and redeployed.
That breaks fast in containerized systems. A service instance may be recreated during a rollout, moved to another node, or replaced after a health failure. The instance still exists logically, but its exact network location does not stay stable enough for hardcoded dependencies.
F5 describes this shift plainly. In microservices systems, the set of running instances changes dynamically and network locations are assigned dynamically, which means a discovery mechanism is required rather than optional, as outlined in F5's explanation of service discovery in microservices.
What discovery actually gives you
Think of static configuration as an old printed phone book. It is useful only until people move. Service discovery is the live directory that updates as the system changes.
That gives you three practical gains:
- Stable service names: Your app calls a logical service identity, not a temporary instance address.
- Safer scaling: New instances can join and old ones can leave without manual rewiring.
- Cleaner deployments: Teams stop baking brittle location assumptions into application code.
Practical rule: If your infrastructure can reschedule or autoscale workloads, hardcoded addressing is already technical debt.
For AI systems, this matters more than teams expect. A retrieval service might scale independently of the API. An embedding worker may restart under load. A reranker may be added as a separate service later. If every change forces manual endpoint management, your release velocity slows down and your error rate climbs.
The point is simple. Dynamic infrastructure needs dynamic lookup. Anything else is nostalgia disguised as architecture.
Two Paths to Discovery Client-Side and Server-Side
Once you accept that services need a live directory, you have to decide who does the lookup. There are two main patterns. The client can do it, or the infrastructure can do it for the client.

Client-side discovery puts logic in the app
In client-side discovery, the calling service asks the registry where a target service is, gets back available instances, picks one, and sends the request itself.
That gives developers more direct control. It can be useful when you want application-aware routing behaviour or when your stack already assumes smart clients. But there's a catch. Every client now needs discovery logic, load balancing behaviour, retry rules, and sane failure handling.
That is fine for a platform team with strict libraries and strong standards. It is a mess for a startup with several services written by different engineers under deadline pressure.
- What you gain: Fine-grained control in the caller.
- What you pay: More code, more consistency risk, more chances to implement retries badly.
- Where it hurts: Polyglot environments where each language stack ends up solving the same infrastructure problem differently.
Server-side discovery pushes complexity into infrastructure
In server-side discovery, the client sends traffic to a stable endpoint, usually a router, load balancer, gateway, or platform service. That intermediary looks up healthy instances and forwards the request.
This keeps application code cleaner. It also aligns better with how modern platforms already work. Your developers call a service name. The platform figures out where live instances are.
For most AI product teams, this is the more sensible trade. You want engineers working on retrieval quality, permissioning, fallback behaviour, and workflow design. You do not want them all writing custom discovery code in every service.
If the same concern appears in every service, it usually belongs in infrastructure.
Here's the practical comparison:
| Pattern | Where lookup happens | Best fit | Main downside |
|---|---|---|---|
| Client-side discovery | In the calling service | Teams that want direct control in app code | Every client gets more complex |
| Server-side discovery | In a router, gateway, load balancer, or platform layer | Kubernetes-first teams and most product organizations | You must manage or trust an intermediary layer |
A quick visual walkthrough helps if you're aligning a mixed engineering team on the trade-off.
The opinionated recommendation is straightforward. If you're building a modern AI product on Kubernetes or a similar platform, default to server-side style discovery through platform primitives unless you have a concrete reason not to.
The Registry Is Your System's Phone Book Pick a Good One
A service registry is the source of truth for where services currently live. Services register on startup and deregister on shutdown, and common implementations sit on top of tools such as Consul, Zookeeper, Eureka, or platform abstractions such as the Kubernetes service model, as described by microservices.io's service registry pattern.
That sounds neat in architecture diagrams. In production, choosing the registry means choosing an operating model. Some options give you power. Some give you an advantage. Some give you both, but only after they've taken a chunk of your team's time.
Standalone registries are powerful and expensive to own
Products like Consul, Eureka, and ZooKeeper exist for a reason. They can support environments where services span multiple platforms, where you need more direct control, or where your architecture predates Kubernetes and won't be replaced soon.
They also make you the caretaker.
You have to think about availability, upgrade paths, client integration, service registration rules, and how teams interact with the registry safely. None of that improves your AI answer quality. None of it helps your customer get value faster.
Use a standalone registry when you need one, not because it sounds architecturally impressive.
Platform-native discovery is usually the right default
If you run on Kubernetes, you already have a practical answer. Kubernetes gives workloads a stable Service abstraction so they can find one another even while Pods are replaced. That is the operational need service discovery solves, baked into the platform.
For many teams, that is enough.
You get a stable name, built-in routing, and a simpler mental model for application developers. You also reduce the amount of custom discovery code your team has to maintain. That usually means fewer integration bugs and less operational drag.
A boring default is often the correct architecture choice.
Service meshes solve bigger problems and add bigger overhead
Then there's the service mesh path. Istio and Linkerd don't just participate in discovery. They also add traffic shaping, security policy, observability hooks, and more control over service-to-service communication.
That can be worth it. It can also be too much.
If your team still struggles with dependency mapping, readiness checks, and basic rollout safety, adding a mesh won't make you more mature. It will make your failure modes more layered.
Here is the practical comparison.
Service Discovery Tooling Comparison
| Category | Examples | Primary Use Case | Key Trade-Off |
|---|---|---|---|
| Standalone registry | Consul, Eureka, ZooKeeper | Mixed environments or teams that need direct registry control | More infrastructure to run and govern |
| Platform-native discovery | Kubernetes Services | Kubernetes-first application platforms | Less flexibility than a custom control plane, but far lower overhead |
| Service mesh | Istio, Linkerd | Advanced routing, policy, and observability across many services | Significant added complexity and operational burden |
My advice is blunt. Start with the platform. Move to a mesh only when you can name the traffic, security, or observability problem you cannot solve cleanly without it. Reach for a standalone registry only if your environment requires that level of separation and control.
What Happens When Your Discovery Fails During an Inference
Most content on microservices service discovery stops at patterns and diagrams. That is not where production teams bleed. They bleed when discovery degrades in the middle of a user request.

This is where AI reliability gets exposed
Take a RAG request. A user asks a question. Your orchestrator needs the auth layer, the retrieval service, the vector store interface, maybe a reranker, then the model gateway. If discovery breaks anywhere in that chain, the user does not care whether the registry, DNS layer, or sidecar caused it. They care that your product failed.
This is the operational gap many explainers skip. Partial outages, stale entries, split-brain conditions, and bad health state can all route traffic to the wrong place or no place at all. API7 calls out this neglected issue directly in its discussion of service discovery failure modes and the harder question of how to keep traffic flowing when discovery itself degrades, in API7's article on service discovery in microservices.
Here is what that looks like in practice:
- Registry partial outage: New lookups fail even though some service instances are healthy.
- Stale discovery data: A caller keeps trying an instance that has already gone away.
- Bad health registration: Traffic gets routed to a service that is technically alive but operationally broken.
Design for degraded operation not perfect conditions
The teams that handle this well do not chase perfection. They make failure predictable.
A sound approach usually includes:
- Short-lived cached discovery results: If fresh lookup fails briefly, callers can continue using recently known-good locations for a limited window.
- Aggressive readiness and health signals: A service should stop receiving traffic before users discover it is broken.
- Circuit breakers and bounded retries: Stop one failing dependency from dragging the rest of the request path down with it.
- Explicit user-facing fallback behaviour: If retrieval is unavailable, decide whether to fail fast, answer from a smaller context, or tell the user the knowledge-backed path is currently unavailable.
If your AI workflow has no degraded mode, it does not have a production design.
That last point matters most. Inference does not need to be perfect under failure. It needs to be understandable. If the knowledge layer is unreachable, maybe the request should return a clear limitation rather than hanging until a timeout. If the reranker is down, maybe the system skips it and uses a simpler path. If a non-critical enrichment service disappears, maybe the answer still goes out with reduced confidence features.
Your users can tolerate limits. They will not tolerate randomness.
The Real Question Should You Manage a Registry or Use the Platform
It's common for teams to waste time comparing tools before they've answered the only question that matters. Do you want to build product features, or do you want to run more infrastructure?
There is a real design shift happening here. Discovery is increasingly folded into infrastructure layers rather than handled directly in application code, and the practical trade-off is less app complexity versus more control-plane complexity, as discussed in Cerbos's take on service discovery and load balancing in microservices.
Most teams should stop shopping for registries
If you are Kubernetes-first, use Kubernetes Services and DNS-style service naming. Keep it simple. Let the platform handle stable service identity. Let your engineers spend time on prompt routing, retrieval correctness, policy enforcement, auditability, and UX.
A standalone registry is not a badge of seriousness. In many companies, it is just another fragile system to patch, observe, and explain during incidents.
This is also where infrastructure visibility matters. If you rely on platform-native discovery, you still need clear monitoring on the layers around it. A practical companion read is this guide to monitoring cloud infrastructure, especially if your team has better app metrics than platform metrics right now.
When to move beyond the platform default
You should consider more than the platform default when your requirements are undeniably more complex, such as:
- Multi-environment sprawl: You have services running across very different platforms that need one discovery model.
- Advanced traffic control: You need richer routing, policy, or service-to-service controls than the platform provides comfortably.
- Dedicated platform ownership: You already have the people and processes to operate control-plane components well.
If those conditions are not true, stay with the platform. Most AI teams do not fail because they lacked a custom discovery stack. They fail because they introduced unnecessary complexity before the product itself was stable.
Your Checklist for Migrating to a Discovery-Powered System
Migration goes badly when teams treat discovery as a refactor detail. It is not. It changes how services identify one another, how health gets represented, and how failures spread.

Questions to answer before you migrate
Use this as a pre-build checklist, not a post-incident one:
- How will services register and leave cleanly so traffic does not keep flowing to instances that are shutting down?
- Which discovery pattern are you standardizing on so teams do not mix smart clients with smart infrastructure in inconsistent ways?
- What counts as healthy enough to receive traffic for each service in the AI request path?
- What happens when discovery data is wrong or unavailable for a critical dependency like retrieval or auth?
- Where will discovery-related configuration live so environment differences do not become deployment surprises?
- Which metrics and alerts prove the system is healthy before users tell you it isn't?
A second practical step is architectural consistency. If you're already thinking about orchestration, fallback paths, and agent workflows, Zephony's write-up on AI agent design patterns is a useful companion because discovery decisions affect how those patterns behave under load and failure.
The right migration is usually the least dramatic one. Standardize service naming. Use the platform's built-in discovery if available. Add health checks that reflect real readiness. Define degraded behaviour for critical request paths. Then roll it out incrementally.
If you need to ship an AI product that works beyond the demo, Zephony builds production-ready systems with the backend reliability, service architecture, and delivery speed that are often difficult to assemble in-house.