In Server-Side Service Discovery, client services do not communicate directly with the Service Registry. Instead, an intermediary component such as a Load Balancer, API Gateway, or Router handles service discovery, selects an available service instance, and forwards the request. This approach simplifies client-side communication and provides centralized traffic management in microservices architectures.
- Enables centralized service discovery and request routing through a Load Balancer or API Gateway.
- Reduces client-side complexity by offloading service lookup and load balancing responsibilities.
- Improves scalability, fault tolerance, and traffic distribution across multiple service instances.
Service Discovery
Service Discovery is a mechanism through which microservices register themselves with a central server known as a Service Registry. Whenever a service needs to communicate with another service, it can dynamically discover the required service instance information from the Service Registry. The registry stores information such as:
- Service name
- IP address
- Port number
- Health status
- Number of running instances
Example: Suppose we have a microservices application where Service-A wants to communicate with Service-B. Instead of directly contacting the Service Registry, Service-A sends the request to a Load Balancer. The Load Balancer discovers the available instances of Service-B through the Discovery Server and forwards the request to one of the healthy instances.
The architecture contains the following components:
- Service-A
- Four instances of Service-B
- A Discovery Server
- A Load Balancer
When Service-B instances start, they register themselves with the Discovery Server. The Discovery Server stores and continuously updates this information in a centralized repository called the Service Registry

So, Service Registry is a crucial part of service identification. Itâs a database containing the network locations of service instances. A Service Registry must be highly available and up-to-date. Here, inside Service Registry we have 4 different instances of Service-B and they are running in some port number and some IP address. Similarly, for Service-A we have one different instance.

When Service-A needs to communicate with Service-B, it sends the request to the Load Balancer. The Load Balancer queries the Discovery Service to obtain all available instances of Service-B. After retrieving the registered instances, the Load Balancer applies a load balancing strategy and forwards the request to the most suitable Service-B instance

Note: Service Discovery and Load Balancing serve different purposes. Service Discovery is responsible for locating available service instances, whereas Load Balancing is responsible for selecting an appropriate instance among multiple available services. In microservices architectures, both mechanisms work together to enable efficient service-to-service communication.
Working of Server-Side Service Discovery
Step 1: Client Sends Request
The client service (Service-A) sends a request to a Load Balancer or API Gateway instead of directly calling Service-B.
Service-A -> Load Balancer
Step 2: Load Balancer Queries Discovery Service
The Load Balancer requests information about available Service-B instances from the Discovery Server.
Load Balancer -> Discovery Service
Step 3: Discovery Service Returns Available Instances
The Discovery Service responds with all healthy instances of Service-B.
- Service-B1
- Service-B2
- Service-B3
- Service-B4
Step 4: Load Balancer Selects an Instance
The Load Balancer applies a load balancing algorithm such as:
- Round Robin
- Least Connections
- Weighted Response Time
And selects the most suitable Service-B instance.
Step 5: Request is Forwarded
The Load Balancer forwards the request to the selected Service-B instance.
Service-A -> Load Balancer -> Service-B3
And this complete pattern we called Server Side Discovery.
Advantages
- Simplifies client-side service communication.
- Provides centralized service management.
- Supports automatic load balancing.
- Reduces client implementation complexity.
- Improves scalability and fault tolerance.
Limitation
- Additional Infrastructure Required: Requires dedicated components such as Load Balancers, API Gateways, or Discovery Servers, which increase system complexity.
- Potential Single Point of Failure: If the Load Balancer or Discovery Service becomes unavailable, service communication can be disrupted.
- Operational Overhead: Managing and maintaining Load Balancers and Service Registries adds extra operational effort.