Adding a health API

Testing a system landscape of microservices that use a combination of synchronous APIs and asynchronous messaging is challenging. For example, how do we know when a newly started landscape of microservices, together with their databases and messaging system, are ready to process requests and messages?

To make it easier to know when all the microservices are ready to process requests and messages, we have added a health API in all the microservices. They are based on the support for health endpoints that comes with the Spring Boot module known as the Actuator. By default, a health endpoint based on the Actuator answers UP (and gives 200 as the HTTP return status) if the microservice itself and all the dependencies Spring ...

Get Hands-On Microservices with Spring Boot and 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.