Wednesday, July 17, 2019

Server Side Load Balancing vs Client Side Load Balancing


Server Side Load Balancing




In server side load balancing, there is a load balancer (separate server) in between requests and responses. So all the incoming traffic will be hitting to the edge server and It will distribute the incoming requests among the service instances based on the predefined rule.Ex: round robin
This edge server can be a hardware load balancer or a software load balancer.

Client Side Load Balancing

Basically client side load balancing came into the picture with the micro service architecture.

According to the micro service architecture there are a lot of loosely coupled services and inter service communication is required at the service level to expose a multiple entity involvement feature to the outside. Service discovery registering multiple instances from each service and load balancing among those instances and happening on the client side.



Suppose Service A (client side) wants to access Service B (server side). Service B has three instances and register all at the discover server (Eureka). Service A has enabled the Ribbon client which allows to do the client side load balancing. It's getting the available Service B instances from the discovery server and redirect the traffic by staying from the client side.
That's the concept of client side load balancing.