有两个尤里卡服务器(称为ES1和ES2)具有以下配置。尤里卡服务器高速缓存刷新
spring:
profiles: production
server:
port: 8761
eureka:
client:
registerWithEureka: true
fetchRegistry: true
serviceUrl:
defaultZone: http://${eureka.peer.hostname}:8761/eureka/
的同步工程,但释放,当一个尤里卡服务器(说ES2)被放倒对方尤里卡服务器(ES1)在生产过程中依然保持着旧的缓存信息,并在ES2开始回到它注册尤里卡客户但不会发生旧客户端的注销,导致功能区负载均衡器使用过时的信息。
用于在配置下注册尤里卡客户端。
eureka:
instance:
metadataMap:
instanceId: ${service.contextPath}:${spring.application.instance_id:${random.value}}
client:
serviceUrl:
defaultZone: http://localhost:8761/eureka/
为什么旧实例不能从尤里卡服务器上取消注册?因此,我们必须完成关闭和重启我们的基础设施。
希望这有助于 - https://github.com/spring-cloud/spring-cloud-netflix/issues/373#issuecomment-110331739 –