0

I'm going to use Spring Config Service (SCS) for our Microservices Architecture. Currently our Cloud stack is on AWS. Since SCS will run on a Docker, thanks to a Pipeline + Cloud Formation, and our config repository will be on a private GitHub repository with encrypted values:

  1. Is there any best practice to refresh the repository that will be "pulled" inside the Docker?
  2. How can I update it on any instances? (since my service will be load balanced with HA).
abierto
  • 1,447
  • 7
  • 29
  • 57
  • Have you considered using RabbitMQ for this? https://cloud.spring.io/spring-cloud-bus/ – code Nov 09 '17 at 04:54

2 Answers2

0

pleas refer following poc https://github.com/pooja-varma/cloud-config-and-eureka-server may be it helps you

P Varma
  • 26
  • 4
  • This doesn't answer my question. I'm not asking for code, I'm asking for methodologies... I know how to implement a Discovery and a Config Service through Spring Cloud, I am concerned about how to maintain a configuration service while is on HA. How to pull new configuration from the cloud git repo, updating all instances without rerunning the container... – abierto Oct 30 '17 at 07:50
0

Config clients don't poll for changes. It has to be triggered and there is a EnvironemntChanged listened by the application and any changes in the properties will be loaded again. If you need more control over when it has to be refreshed and if you want that to be atomic I would recommend you to use @RefreshScope which are lazy proxies and initialized only when they are used. The Environment of your application is pulled every time and it also actuator endpoints to the rescue as well.

Please refer the documentation here.

http://cloud.spring.io/spring-cloud-static/docs/1.0.x/spring-cloud.html#_refresh_scope

zeagord
  • 2,257
  • 3
  • 17
  • 24