Git Product home page Git Product logo

Comments (2)

kbastani avatar kbastani commented on September 26, 2024

Why @EnableZuulProxy is missing in api-gateway-microservice. Isn't this service acts as gateway for other services?

The API gateway service can use either @EnableZuulProxy or @EnableZuulServer.

Using the @EnableZuulServer annotation you must explicitly configure proxying behavior to other applications. By using the @EnableZuulProxy annotation you are getting the benefit of automated discovery of Zuul filters through Eureka. This automatic routing is provided by Ribbon. Ribbon will contact Eureka and route requests to the services that correspond to the configured filter.

http://cloud.spring.io/spring-cloud-netflix/spring-cloud-netflix.html#_plain_embedded_zuul

From the docs:

You can also run a Zuul server without the proxying, or switch on parts of the proxying platform selectively, if you use @EnableZuulServer (instead of @EnableZuulProxy). Any beans that you add to the application of type ZuulFilter will be installed automatically, as they are with @EnableZuulProxy, but without any of the proxy filters being added automatically.

These annotations should not be used together.

What is the use of @EnableSidecar. It sounds like a new annotations who functionality is not defined. can you please explain its use?

Sidecar allows non-JVM apps (like Node.js) to be proxied through Zuul server. I have plans to use it in a later revision.

http://cloud.spring.io/spring-cloud-netflix/spring-cloud-netflix.html#_polyglot_support_with_sidecar

Why @EnableZuulProxy is present in user-microservice. Isn't this a standalone service and does not act as gateway or proxy?

By adding this annotation in combination with the gateway service's sidecar annotation, I can inject this service's filters as routes to any service that has the @EnableZuulProxy annotation and is configured for discovery to Eureka. This is convenient for scenarios where you want each REST API instance to have a catalog of all other REST APIs exposed by services in the architecture.

from spring-cloud-microservice-example.

sridhar1982 avatar sridhar1982 commented on September 26, 2024

do you have example of last case you described? (the last paragraph in yours)

from spring-cloud-microservice-example.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.