在Client的配置文件中,分别配置所有的Eureka Server地址
eureka: client: service-url: defaultZone: http://192.168.93.1:8761/eureka/,http://192.168.93.1:8762/eureka/,http://192.168.93.1:8763/eureka/
例如我们需要3个Eureka Server
Eureka1 :http://localhost:8761/
Eureka2 :http://localhost:8762/
Eureka3 :http://localhost:8763/
在每个Server的配置文件中,修改其注册地址,使其两两注册。
如上图:
Eureka1 注册 http://localhost:8762/ 和 http://localhost:8763/
eureka:
client:
service-url: defaultZone: http://192.168.93.1:8762/eureka/,http://192.168.93.1:8763/eureka/
Eureka2 注册 http://localhost:8761/ 和 http://localhost:8763/
service-url: defaultZone: http://192.168.93.1:8761/eureka/,http://192.168.93.1:8763/eureka/
Eureka3 注册 http://localhost:8761/ 和 http://localhost:8762/
service-url: defaultZone: http://192.168.93.1:8761/eureka/,http://192.168.93.1:8762/eureka/
原文链接:https://www.cnblogs.com/net-safe/p/13529297.html