How does client side load balancer like ribbon works?

2.3k views Asked by At

I am trying to understand out how client side load balancing works. So far I have been able to understand following.

  1. There is no centralized load balancer.
  2. Load balancer now resides with the service itself.
  3. These load balancers know about all of the service instances (their ip port etc.) through service discovery.
  4. Depending upon load balancing algorithm they can forward the requests to these instances.

What I don't understand : How would client make a request, In traditional load balancer, user can make a request using dns name for the load balancer, but how would that go in client side load balancing especially in cloud environment where instances will come and go.

1

There are 1 answers

0
Tom On BEST ANSWER

The keyword here is Service Discovery.

You will need to have a central register where all instances of your services are listed (and unlisted if they go down for some reason). Your client-side load balancer can then ask the register for the URLs of the service instances and select one of them.

A tool that does this is Eureka, for example.