简体   繁体   English

如何以容错模式运行Spring Cloud Config服务器?

[英]How to run Spring Cloud Config server in Fault Tolerance mode?

在我的项目中,我们需要运行两个Spring Cloud配置服务器实例,因此,如果一个实例出现故障,其他实例将负责配置服务器的职责。

Currently, you would need to put config server behind a load balancer. 当前,您需要将配置服务器放在负载均衡器之后。 It is stateless, so that wouldn't hurt. 它是无状态的,因此不会受到伤害。 There is an open issue to configure multiple config server url's in the client, so it could do failover there. 在客户端中配置多个配置服务器url时存在一个未解决的问题 ,因此它可以在那里进行故障转移。

If you are running multiple instances of the config server, you can have them all register themselves in Eureka, and maybe do a lookup to the config server with it's application name via Eureka in all the other microservices. 如果您正在运行配置服务器的多个实例,则可以让它们全部在Eureka中进行注册,并可能在所有其他微服务中通过Eureka使用其应用程序名称来查找配置服务器。 This way, Zuul (and Ribbon) will take care of the load balancing. 这样,Zuul(和功能区)将负责负载平衡。

Edit: I guess spencergibb is right. 编辑:我猜spencergibb是正确的。 It's best to use a load balancer, for eg: ELB, if you're going to deploy on AWS. 如果要在AWS上进行部署,最好使用负载均衡器,例如:ELB。

Consider multiple spring-cloud-config-uris for high availability 考虑多个spring-cloud-config-uris以实现高可用性

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM