Comments (2)
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.
do you have example of last case you described? (the last paragraph in yours)
from spring-cloud-microservice-example.
Related Issues (20)
- how does Configuration Service signal a refresh to Discovery Service signal a refresh
- can i use maven 3.5 on linux
- after start up...a few of the services are in Exit 137 state and im getting 404 for the configserver
- What tools to draw the micro-service design? HOT 1
- mvn clean install failure
- demo usage
- Cannot execute request on any known server
- What's the right sequence to start projects?
- Can't Access Docker Repos HOT 1
- docker-compose up some error
- Connection to http://localhost:8500 refused HOT 1
- Since there is a parent, it is also a import, why
- Could you please update project to use Spring Boot version 2.0.4.RELEASE ?
- http://localhost:9006/ error
- I am able to run this whole code on windows? But how to access URL and what to execute ?
- Connection Refused
- Want to compile the code. HOT 1
- Unable to build project. Some processing while processing the POMs
- Are these images available in docker hub?
- Could you please update code to use latest dependencies? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-cloud-microservice-example.