Hey all. I am using Spring Cloud 3.1.3. I have an application that is scheduled to refresh its context every 30 seconds with an initial 60 second delay. If I point my application to a config server running on my local machine, the feature performs as expected; 60 seconds after application startup, one call is made to my local config server to retrieve application properties, and every 30 seconds the same one call to my local config server is made. However, if I point my application to a config server running in the cloud (AWS), 60 seconds after application startup, three successive calls to the config server are made, and every thirty seconds the same three calls are made back-to-back-to-back.

Here's the relevant application code:

@Scheduled(initialDelayString = "${repoLoadInitialDelayMillis:60000}", fixedDelayString = "${repoLoadFreqMillis:30000}")
public void refresh() {

    Set<String> updatedKeys = contextRefresher.refresh();

    if (requiresReload(updatedKeys)) {
        LOG.info("Updates to oauth2.clients properties detected from config; reloading CustomInMemoryRepo");
        load();
    }
}

Comment From: ryanjbaxter

The only difference is where the config server is located? The config client is running locally in both scenarios? How are you determining 3 successive calls are made.

Comment From: combs2j2

Yes the only difference is the location of the config server and yes my client was running locally in both scenarios. I could see in both the client's logs and the config server logs that3 successive calls were being made.

Comment From: ryanjbaxter

Could there be any kind of infrastructure in front of the config server on AWS that might be replicating the request?

Comment From: combs2j2

That's what I'm thinking was the case. I've since changed how my EC2 instance is running the client application and it's only making one call to config server every 30 seconds as expected. I think this issue can be closed. Thanks!