5

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?

tom redfern
  • 30,562
  • 14
  • 91
  • 126
NikhilWanpal
  • 2,960
  • 3
  • 23
  • 40
  • 1
    I could not find a suitable solution. And have now started working on a project myself; named: sarathi (https://www.npmjs.com/package/sarathi): Service discovery aware, declarative rest client with client side load balancing. Leaving it here in the hopes that someone else has an answer and posts it; while this project gets at least the basic features. – NikhilWanpal Jan 23 '17 at 05:55

2 Answers2

3

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

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

paulchapman
  • 233
  • 2
  • 7
1

I think I should just close this for now, it's been a while. Like I said in the comment above, I have built and used logical counterpart for Feign, Ribbon, with extensible support for service discovery frameworks (currently plugin available for consul.in), with different strategies for load balancing, and declarative API mapping like that of feign interfaces in spring boot, configurable retries, fluent API and support for hystrix. It's a family of node modules: https://www.npmjs.com/search?q=Sarathi

NikhilWanpal
  • 2,960
  • 3
  • 23
  • 40