解决Eureka Server不剔除已关停的节点的问题

server端:
eureka.server.enable-self-preservation//(设为false,关闭自我保护主要)
eureka.server.eviction-interval-timer-in-ms//清理间隔(单位毫秒,默认是60*1000)
client端:
eureka.client.healthcheck.enabled = true//开启健康检查(需要spring-boot-starter-actuator依赖)
eureka.instance.lease-renewal-interval-in-seconds =10//租期更新时间间隔(默认30秒)
eureka.instance.lease-expiration-duration-in-seconds =30//租期到期时间(默认90秒)

修改示例:

server端配置:
eureka:
    server:
        enableSelfPreservation: false
        evictionIntervalTimerInMs: 4000
client配置:
eureka:
    instance:
        leaseRenewalIntervalInSeconds: 10
        leaseExpirationDurationInSeconds: 30

注意:更改Eureka更新频率将打破服务器的自我保护功能

转自:https://blog.csdn.net/rickiyeat/article/details/71041648

你可能感兴趣的:(Spring,Cloud)