I am doing POC with Eureka. When I close the service instance, it currently takes about 3 minutes to no longer appear on the Eureka console. I guess (but not sure), does this also mean that this downed instance can still be detected by clients?
When debugging, I can see the server executing the evict task several times before it determines that the lease has expired in the instance that I closed.
My settings are client:
eureka.client.serviceUrl.defaultZone=http://localhost:8761/eureka/
eureka.instance.statusPageUrlPath=${management.context-path}/info
eureka.instance.healthCheckUrlPath=${management.context-path}/health
eureka.instance.leaseRenewalIntervalInSeconds=5
eureka.client.healthcheck.enabled=true
eureka.client.lease.duration=2
eureka.client.leaseExpirationDurationInSeconds=5
logging.level.com.netflix.eureka=DEBUG
logging.level.com.netflix.discovery=DEBUG
Server:
server.port=8761
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
logging.level.com.netflix.eureka=DEBUG
logging.level.com.netflix.discovery=DEBUG
eureka.server.enableSelfPreservation=false
I also tried these settings on the server:
eureka.server.response-cache-update-interval-ms: 500
eureka.server.eviction-interval-timer-in-ms: 500
It seems that they increase the validation, but do not reduce the time until the server recognizes the instance.
Am I missing settings? Is there a best practice for closing instances in production to get this instantly?
Thank!