0
votes

I am using springcloud config server to refresh my application properties at the runtime on scheduled basis in production environment. My schedule runs biweekly without any issues.

My application is running on Kubernetes cloud on multiple pods. Pods tends to crash or restart at any moment. What happens in case of pod crash/restart it fetches the latest property file from Config Server and repository at application startup rather waiting for next scheduled refresh cycle.

This lead to inconsistencies across the pods configuration and application behavior.

What I am looking for a strategy to avoid property refresh at the app startup and "Spring cloud config" client to only refresh based on refresh cycle.

Any suggestions to solve above would be greatly appreciate.

1
I wonder it could be disabled by default. Then using /actuator/env update a property after startup. Not sure if that would work. - spencergibb
Everytime pod restart I have to figure-out a way to manually start it using endpoint. - Rahul Sharma

1 Answers

0
votes

You want to use old properties even your application gets restarted so you need to keep old properties detail somewhere. You can not do that in your application as property detail is coming from config server so its better to set refresh rate for config server also how frequent it should pull config detail from git or whatever is your source. If you set refresh-rate to two week of config server it will contain old property detail only and does not matter how frequent your application restarted it will get old properties from config-server.