Is there a way to configure that cloud config server shall only poll git hub for properties during start up and when queried with refresh scope requests ?

I have setup an application with spring cloud eco systems (Eureka, Zuul, cloud config, zipKin, sleuth) Once all the services are deployed, the number of connections made by cloud config server to git hub increases rapidly and this causes performance issues in git hub. I would like to restrict the number of polls cloud config server can make to git hub. Such as it should poll git hub to get properties only during the below scenarios:

1) start up 2) when we have changed the properties and sent a "refresh" request to the service.

Comment From: tdanylchuk

  1. You may disable config service health-check on both sides - clients and server. In this case only once service restarted properties would be fetched. As possible solution you can set refreshRate property so config service will use local cache instead of fetch new properties.

  2. read about config server monitor

Comment From: sandeepvchowhan

@tdanylchuk: I have config server version 1.1.1.RELEASE, even though I set refreshRate to 12 hours, I see frequent activity on GitHub from the config server. I have config server health enabled at clients, but since I have refreshRate set, shouldn't it serve from the local cache instead of GitHub call?

I also set basedir: as a folder location to eliminate any possibility of OS corrupting the properties. I do not see the timestamp on the property files getting updated, however, if I change a property on config-repo. i see the change reflecting immediately in my config server's fetch.

spring: cloud: config: server: git: refreshRate: 43200

Comment From: tdanylchuk

try to update config server to latest, as version you are using might not have such feature.

Comment From: sandeepvchowhan

thanks, @tdanylchuk : I updated to 2.0.2 version and I don't see calls to GitHub. however, I had refreshRate as 900 (15 mins) but I don't see a refresh happening. I think i'm still good since config server restart is fetching the latest properties.

Comment From: spencergibb

Closing this due to inactivity. Please re-open if there's more to discuss.