Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can i have more than one Spring Cloud Config Server?

I understand that i can use more than 1 repositories to distribute my configurations across multiple repositories (probably for each application) but, can I run more than 1 Config servers for these repositories , so that we can avoid a single point of failure a the 'Config Server'.

If we can run multiple config servers, how do i abstract my client's from accessing any one particular config server ?

Update (after further reading): instead of using IP in the URI, if i use a URL which load balances multiple IPs, will it solve my problem of single point of failure at Config Server ?

spring.cloud.config.uri: http://myconfigserver.com

like image 967
yathirigan Avatar asked Apr 13 '15 11:04

yathirigan


2 Answers

Spring cloud server can register itself with eureka. Check this out-> http://cloud.spring.io/spring-cloud-config/spring-cloud-config.html#eureka-first-bootstrap

like image 50
Vibhaanshu Avatar answered Sep 23 '22 06:09

Vibhaanshu


I just tested Spring Cloud Config Server with Spring Cloud Bus in Cloud Foundry. When scaled up to multiple instances, a trigger to the server's /monitor endpoint causes all other instances to be updated, too. Furthermore, when shutting down a few instances, the clients are still able to get information from the other instances. So long story short, it works as expected.

To answer your other question: Yes, you need some way of addressing "one of many" servers. That can be done using DNS, but you might also want to use Eureka or some other service discovery mechanism for this. In Cloud Foundry you get a simple solution out of the box, namely a DNS entry that when used automatically connnects to a running instance.

like image 39
C-Otto Avatar answered Sep 21 '22 06:09

C-Otto