Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I'm using Spring, Eureka and Ribbon. I want to change the refresh interval for ribbon. While reading the documentation, I found out that I should set the following property:
my-service.ribbon.ServerListRefreshInterval=99999
However, it doesn't help because when I create a load balancer, Spring uses the following constructor
public DynamicServerListLoadBalancer(IClientConfig clientConfig, IRule rule, IPing ping,
ServerList<T> serverList, ServerListFilter<T> filter) {
this(
clientConfig,
rule,
ping,
serverList,
filter,
new PollingServerListUpdater()
And this constructor doesn't use my property.
I had a look at this topic : How to override the ribbon.serverListRefreshInterval default value in Spring Cloud Ribbon?
The problem is related to this bug : ribbon.ServerListRefreshInterval ignored #1304.
The bug has been solved in spring-cloud-netflix 1.3.0.RC1 on March 2017 .
You are using Spring Cloud Camden.SR7 which uses Spring Cloud Netflix 1.2.7.RELEASE
, where the bug wasn't fixed yet.
Either force the use of spring-cloud-netflix 1.3.0 or above, or switch to a Spring Cloud version that contains this kind of dependency, e.g Spring Cloud Edgware.SR2 (Maven repo) which uses Spring Cloud Netflix 1.4.3.RELEASE
–
–
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.