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

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐