Search code examples
microservicesspring-cloud

Does the internal service call need to go through the API gateway, such as zuul?


I have used eureka as service discovery. If all internal services call each other go through the API gateway, I can't use ribbon-backed RestTemplate or feign client any more.

Is it necessary or some option?


Solution

  • No. Zuul is a gatekeeper. You need it to pass requests from the UI. Internal communication should not pass through a gateway.

    Just for reference:

    https://medium.com/microservices-in-practice/service-mesh-vs-api-gateway-a6d814b9bf56

    enter image description here

    You can also find more info in Ken Finnigan's book "Enterprise java microservices" (https://www.manning.com/books/enterprise-java-microservices)