Refreshing the registry

Let's back up for a moment to the previous sample. Self-preservation mode has been disabled, but it still takes a long time to wait on the lease cancellation by the server. There are several reasons for this. The first is that every client service sends heartbeats to the server every 30 seconds (default value), which is configurable with the eureka.instance.leaseRenewalIntervalInSeconds property. If the server doesn't receive a heartbeat, it waits 90 seconds before removing the instance from the registry and thereby cutting off traffic sent to that instance. It is configurable with the eureka.instance.leaseExpirationDurationInSeconds property. Those two parameters are set on the client side. For testing purposes, we ...

Get Mastering Spring Cloud now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.