Spring-cloud-netflix: How can a new service ask zuul to update information (metadata) from eureka?

Created on 7 Feb 2017  路  7Comments  路  Source: spring-cloud/spring-cloud-netflix

Hi!
I have eureka server that is running, zuul and several services that already have registered in eureka. But now I want to add a new service. As far as I understand, zuul periodically requires information about resgistered services from eureka. But I want in order a new service asks zuul to update information from eureka at once it registered in eureka. How can I realize it?

question

All 7 comments

Why cant you wait for Zuul to just refresh the client cache?

It should do this automatically. It will take a few minutes to happen.

Yes, it takes a few minutes. But I need speed up this process. How can I do it??

The only way I know of speeding up the process is by adjusting eureka.instance.leaseRenewalIntervalInSeconds.

In documention I found the next:

If you are using @EnableZuulProxy with tha Spring Boot Actuator you will enable (by default) an additional endpoint, available via HTTP as /routes. A GET to this endpoint will return a list of the mapped routes. A POST will force a refresh of the existing routes (e.g. in case there have been changes in the service catalog).

NOTE
_the routes should respond automatically to changes in the service catalog, but the POST to /routes is a way to force the change to happen immediately._

For my case it's a good solution.

@YakovBurtsev so can we close this?

@spencergibb yes, of course

Was this page helpful?
0 / 5 - 0 ratings