0

Currently I am using in one of my project JHipster micro-service centralization approach using central-config folder, using JHipster Registry app using native file system .

I have two questions to ask---

  1. If we can set the frequency of the pull so we can get better instant updates from the config server?

  2. How the config server treat the data pulling the information from a source (git or binary repository) like it copy the files to a local directory, keep the information in memory ?

Gaël Marziou
  • 16,028
  • 4
  • 38
  • 49
  • Have you read the Spring Cloud Config Server doc? https://cloud.spring.io/spring-cloud-config/reference/html/ – Gaël Marziou Aug 27 '20 at 10:38
  • @GaëlMarziou Can you kindly highlight where exactly the above two answers I can find, a documentation can be interpreted in many ways, but if you can specify ? – Debasish Chakraborty Aug 28 '20 at 11:03
  • What do you mean by binary repository? – Gaël Marziou Aug 28 '20 at 12:25
  • @GaëlMarziou may be I have not used that much so not familiar, if you can elaborate how would binary repository can help me achieve my goal? – Debasish Chakraborty Aug 28 '20 at 12:38
  • I asked you what is a binary repository because you used this term and I have no idea what it means in this context. I know only 3 backends: native (file system), git and jdbc; None can be considered as binary – Gaël Marziou Aug 28 '20 at 12:44
  • @GaëlMarziou understood your point, so in the context I saw your responded with an answer, let me go through it and research and if any further query will revert – Debasish Chakraborty Aug 28 '20 at 13:10
  • @GaëlMarziou binary repository I was trying to mean some Binary repository server like JFROG etc. if can be useful at this context? you can help share your thought on that too if possible – Debasish Chakraborty Aug 28 '20 at 13:19
  • Oh, a binary repository like JFrog Artifactory or Sonatype Nexus does not seem to be a good fit to store configuration files but if someone is forcing you to do so, it means that you have to implement `EnvironmentRepository` interface on top of it. This sounds overkill unless your use case is not about app configuration. See https://cloud.spring.io/spring-cloud-config/reference/html/#_environment_repository – Gaël Marziou Aug 28 '20 at 14:35

1 Answers1

0
  1. this is not how it works, applications do not poll config server on a regular basis. The configuration gets loaded at startup time. If you make a change in config server and want the applications to reload their application context (see also @RefreshScope bean annotation), it's up to you to either call /management/refresh on each client or you will Spring Bus (if you use it) to send refresh events, see https://cloud.spring.io/spring-cloud-config/reference/html/#_push_notifications_and_spring_cloud_bus
  2. For git backend, the server clones remote repositories when configuration is first requested or at startup and then refreshes according to spring.cloud.config.server.git.refreshRate value, see https://cloud.spring.io/spring-cloud-config/reference/html/#_git_refresh_rate
Gaël Marziou
  • 16,028
  • 4
  • 38
  • 49