0

I am using PCF provided config server instance which is backed by GIT based repo to server properties. My application is connected to this config server service instance and exposing "refresh" endpoint. Everything works except when i change the property in git and send http post to my application (/actuator/refresh) immediately after updating property, i do not get updated prop name back in response. If I wait few seconds and then send that http post again to refresh the property then I am getting back the name of the property being updated.

Why do I have to wait few seconds(usually 1- 2min) before my property is being refreshed? Does it have anything to do with mirror synchronization?

6
  • Are you sure there's not multiple instances of the app here? Commented Jun 30, 2021 at 15:36
  • Yes I am 100% sure there is only one instance of the app running as I am building POC. Commented Jun 30, 2021 at 16:40
  • Is it specific properties that are not getting refreshed? Commented Jun 30, 2021 at 17:04
  • No, let me make it clear, Property is getting refreshed but only problem is i have to wait about 2min before /actuator/refresh on client app returns updated property. Means I updated prop in git and if i immediately send refresh on client app then i dont see new value. If I wait for 2 min and then send refresh then i see client has new value. I dont know why I have to wait for around 2min to get it resolved. Commented Jun 30, 2021 at 17:37
  • I understand. Check this one out as you didn't mention version. stackoverflow.com/questions/49363043/… Commented Jun 30, 2021 at 18:09

2 Answers 2

0

If you have multiple instances of the application, you will need to either hit every application instance (AI in PCF) or use something like the following to connect the applications via an event bus.

https://spring.io/projects/spring-cloud-bus

Sign up to request clarification or add additional context in comments.

1 Comment

No, I have only 1 instance running.
0

Is your config server resides outside PCF? Can you plz check if there is any caching for a short period of time. usually TTL is upto 30-120sec and that could be happening.

If you are using spring cloud config then you may need to check the refreshRate set. Usually config server fetches updated configuration data from Git backend by using spring.cloud.config.server.git.refreshRate

1 Comment

No, I am using config server provided from PCF market place.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.