Thursday, February 13, 2020

Server-side and Client-side Load Balancing for HA

Eventually you'll reach a point where you need to run multiple instances of an application or a service for high availability or to manage increased load. That's what load balancer are for.
There's generally two different types:
  1. Server-side load balancers
  2. Client-side load balancers
Server-side Load Balancing :
What many people would call a "load balancer" is actually a server-side load balancer. It can be implemented in hardware or software. The traffic is sent to a dedicated service that decides where to send the traffic, using an algorithm like round-robin, to one of the many instances. 


Server-side load balancing
Client-side Load Balancing :
Instead of relying on another service to distribute the load, the client itself, is responsible for deciding where to send the traffic also using an algorithm like round-robin. It can either discover the instances, via service discovery, or can be configured with a predefined list. Netflix Ribbon is an example of a client-side load balancer.


Client-side load balancing