Senior From PDF Microservices Microservices

Can you explain client-side and server-side load balancing in microservices?

Short answer: There are two main types of load balancing: client-side and server-side. Client-Side Load Balancing: The client (e.g., the microservice making the request) is responsible for deciding how to distribute requests across service instances.

Example code

In Netflix OSS, Ribbon is used for client-side load balancing, where the client has a list of service instances and decides which one to call based on various strategies (e.g., round-robin, random). Server-Side Load Balancing: A load balancer (e.g., HAProxy, Nginx, or Kubernetes LoadBalancer) is responsible for distributing traffic among service instances. The client sends all requests to the load balancer, which then routes them to appropriate instances. Example: In Kubernetes, the service uses an internal load balancer that balances traffic across multiple pods running the service.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details