Cloud and infrastructure

5 min read

Service Discovery: Why Services Should Not Know Each Other’s Addresses in Advance

In a small system, the address of another service can live in configuration. In dynamic infrastructure, instances appear, disappear, and move. Service Discovery keeps service relationships independent from a manually maintained list of addresses.

What problem are we solving?

In static infrastructure, addresses rarely change. Autoscaling, containers, and orchestration make infrastructure fluid: a service may have three instances now, ten tomorrow, and a different set an hour later.

If every consumer stores concrete addresses, every infrastructure change becomes a configuration change across many clients.

How Service Discovery works

Instead of knowing a concrete address, the client uses a logical service name. A registry or infrastructure mechanism resolves that name to healthy instances and traffic is routed to one of them.

Discovery may happen in the client, through a load balancer, DNS, or a platform layer. The principle is the same: the current address becomes an infrastructure detail rather than part of the business integration contract.

What the business gets

The main benefit is less manual coordination during scaling and recovery. Instances can be added or replaced without reconfiguring every consumer.

This makes operational change faster and reduces configuration risk as the number of services and environments grows.

What the team gets

Teams work with stable logical names instead of lists of IP addresses and ports. Deployment, health checks, balancing, and replacement of failed instances become easier to automate.

Discovery still has to be observable: engineers need to know which instance was selected and why a route stopped working.

What the customer gets

Customers do not see Service Discovery directly. They experience it through more resilient scaling and recovery: losing one instance should not make the whole capability unavailable.

What do we pay for it?

There is now another infrastructure mechanism that must remain available and correct. A registry, DNS, or health-check failure can make a healthy service effectively invisible.

Teams also have to reason about address caching, propagation delay, split-brain scenarios, and partial network failures.

When it is unnecessary

If an application consists of a few stable components with fixed addresses and no dynamic scaling, a dedicated discovery mechanism can be unnecessary.

It becomes valuable when infrastructure changes faster than people can safely maintain its connections by hand.

Questions to ask before deciding

In the end

Service Discovery does not make a system reliable by itself. It removes manual coupling between a logical service and its current instances.

For the business, the value appears when infrastructure can scale and recover without a chain of manual reconfiguration across dependent systems.