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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.