top of page

Service Discovery Client/Server Side

  • Writer: Anand Nerurkar
    Anand Nerurkar
  • Feb 14
  • 2 min read

🔎 What is Service Discovery?

In microservices, services need to find and call each other.

But:

  • IP addresses change

  • Containers restart

  • Pods scale up/down

So instead of hardcoding IPs, we use service discovery.

There are two main types:

  • Client-side discovery

  • Server-side discovery

🧭 1️⃣ Client-Side Discovery

📌 How It Works

The client asks a service registry:

“Where is Service B?”

The registry returns a list of available instances.

The client:

  • Chooses one instance (load balancing)

  • Calls it directly

So the client is responsible for:

  • Looking up

  • Load balancing

  • Retry logic

📊 Flow

Client → Service Registry → Gets instance list → Calls Service directly

🛠 Example

Common tools:

  • Netflix Eureka

  • Consul

  • Spring Cloud

In Kubernetes:

  • Internal DNS-based service discovery

🏦 Banking Example

Retail Service needs Customer Service.

Steps:

  1. Retail queries Eureka

  2. Gets 3 instances of Customer Service

  3. Retail picks one

  4. Direct REST call

✅ When to Use Client-Side Discovery

✔ You control all clients✔ Microservices are built in same tech stack✔ You want fine-grained client control✔ Internal-only architecture

Most internal microservice architectures use this.

🌐 2️⃣ Server-Side Discovery

📌 How It Works

The client does NOT query registry.

Instead:

  • Client calls a load balancer

  • Load balancer queries registry

  • Load balancer forwards request

So discovery happens at infrastructure layer.

📊 Flow

Client → Load Balancer → Registry → Target Service

🛠 Example

  • Amazon Web Services ELB

  • Microsoft Azure Application Gateway

  • NGINX

  • Kubernetes Service

🏦 Banking Example

Mobile App → API Gateway → Internal Services

The mobile app doesn’t know anything about service instances.

API Gateway:

  • Routes

  • Load balances

  • Performs discovery

✅ When to Use Server-Side Discovery

✔ External clients (mobile/web)✔ Polyglot clients (multiple tech stacks)✔ You want centralized routing✔ You want better security control✔ Large enterprise environments

Most banks use server-side discovery for external traffic.

⚖️ Key Differences

Feature

Client-Side

Server-Side

Who does discovery?

Client

Load balancer

Load balancing

Client

Infrastructure

Complexity in client

Higher

Lower

Best for

Internal services

External traffic

Control

Distributed

Centralized

🧠 Enterprise Architect Perspective

In a bank:

  • Internal microservices → Client-side discovery

  • External/mobile traffic → Server-side discovery via API Gateway

This gives:

  • Flexibility internally

  • Control and security externally

🎤

You can say:

“Client-side discovery delegates service lookup and load balancing to the client, making it suitable for internal microservices. Server-side discovery centralizes this responsibility in a load balancer or gateway, making it ideal for external-facing or polyglot environments where centralized control and security are important.”

 
 
 

Recent Posts

See All
RFP PRE/POST-PROPOSAL SUBMISSION FLOW

🏆 1. The 5 Pillars to Win a Large Strategic Deal 1. Understand the Client Better Than They Do 👉 Don’t just read RFP — decode it What is their real problem ? What is driving this deal? (compliance, c

 
 
 
DIGITAL LENDING RFP Solution

🎯 RFP Proposal SOLUTION PRESENTATION – DIGITAL LENDING (WITH COLOR-CODED ARCHITECTURE) 1️⃣ Opening “Thank you for the opportunity. I’ll walk you through our approach to building a next-generation dig

 
 
 

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
  • Facebook
  • Twitter
  • LinkedIn

©2024 by AeeroTech. Proudly created with Wix.com

bottom of page