我可以拥有多个Spring Cloud Config Server吗? [英] Can i have more than one Spring Cloud Config Server?

查看:302
本文介绍了我可以拥有多个Spring Cloud Config Server吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解我可以使用多个存储库来分布我的配置到多个存储库中(可能针对每个应用程序),但是 我可以为这些存储库运行多于1个配置服务器,以便我们可以为避免单点故障,请使用配置服务器" .

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 ?

更新(在进一步阅读之后): 如果我 使用一个负载均衡多个IP的URL ,而不是在URI中使用IP,它将解决我在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

推荐答案

我刚刚在Cloud Foundry中使用Spring Cloud Bus测试了Spring Cloud Config Server.当扩展到多个实例时,服务器/monitor端点的触发器也会导致所有其他实例也被更新.此外,当关闭一些实例时,客户端仍然能够从其他实例获取信息.长话短说,它可以按预期工作.

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.

要回答另一个问题:是的,您需要某种方式来处理多个服务器"中的一个.可以使用DNS来完成,但是您可能还想使用Eureka或其他某种服务发现机制.在Cloud Foundry中,您将获得一个简单的解决方案,即一个DNS条目,该条目在使用时会自动连接到正在运行的实例.

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.

这篇关于我可以拥有多个Spring Cloud Config Server吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆