Using Spring Boot actuator
Eureka provides a mechanism to see whether the microservices instances that are registered are still running, every time the microservices send a request to Eureka to say that they are still up and ready to get requests. This is a Heart-beat.
If Eureka does not receive a Heart-beat after some time, it will disconnect that instance, so when it is queried, it will be not available. If the microservice is again starting to send Heart-beats, Eureka will reconnect. By default, the Heart-beat implementation is just to send a regular request letting you know that it's still active.
But Spring provides a better mechanism to know whether a service is up and running, called Spring Boot actuator. Spring Boot actuator provides ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access