Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do client side load balancing for discovered microservices in nodejs

We are trying to build a microservice with nodejs in an environment with other microservices written in java/spring boot.

The other microservices are using consul.io for service discovery and ribbon for client side load balancing. (that would be: spring-boot, spring-cloud-starter-consul-discovery, spring-cloud-starter-feign and spring-cloud-starter-ribbon projects)

Now in this mix, we have a consul node module to register or discover services, but what of rest of the things? How do I do a discovery-aware rest call with a load balancing handled on the client, similar to that of ribbon.

How can I achieve this in node's stack?

like image 698
NikhilWanpal Avatar asked Oct 18 '22 18:10

NikhilWanpal


1 Answers

Is this any use? https://www.npmjs.com/package/resilient

It says: Resilient is conceptually similar to Ribbon, a Netflix's project.

like image 158
paulchapman Avatar answered Oct 20 '22 23:10

paulchapman