Hi,
I start to change all of my company architecture from monolyth API to microservices approache. After several weeks, we find Kong to (correct me if i am wrong) make the proxy and api gateway part and Consul to make the registrator part.
After several days, I find how to add into consul automatically all my services and now i search how to add this services into Kong automatically and how to set the loadBalancer if I have x occurences of one microservice.
Have you examples, sources, documentations, .. to do this ?
Thanks.
PS : Sorry for my english
Hi @throrin19 I'm not an expert with Kong but from a quick look it doesn't look like it has a Consul integration. It looks like it manages registration of APIs internally via a REST API and is super focused on HTTP API proxying/scaling whereas Consul is much more general.
I'd encourage you to take a look at Fabio, which is an open source project similar to what Kong is doing for HTTP APIs but built specifically to integrate with Consul. You run Fabio alongside Consul on your nodes, and you add tags like urlprefix-/foo to you Consul service definitions and Fabio will pick them up and start routing traffic based on the URL prefix. There's a good demo here - https://www.youtube.com/watch?v=gvxxu0PLevs.
Hope that helps!
thanks it works fine with the examples and if i make the register directly inside my microservices.
Most helpful comment
thanks it works fine with the examples and if i make the register directly inside my microservices.