Chapter 5. Running in Production
Observability refers to the ability to continually monitor your microservice to understand how it’s performing, predict problems, and diagnose issues. Monitoring your runtime and application code is nothing new, but in a cloud native world you need to be able to do so with tens, hundreds, or thousands more instances and in cloud native deployment environments (e.g., containers and Kubernetes).
A common question that arises around observability is performance impact. We caution against compromising observability for the sake of performance. Modern JVMs incur only a small overhead when capturing runtime metrics, and the alternative is to essentially “fly blind.” The last thing you need is for your service to go wrong, which you find out only when people start banging on your door, and you realize you have absolutely no diagnostic information to resolve the problem.
Eclipse MicroProfile provides three APIs to help monitor microservices: MicroProfile Health, MicroProfile Metrics, and MicroProfile OpenTracing. Each covers different aspects of observability, from the availability of your service to the performance of the service runtime.
In this chapter we’ll explain how to use MicroProfile to make your microservices observable. We’ll also discuss how to integrate your microservices with the Kubernetes infrastructure to enable Kubernetes to manage your service life cycle and traffic delivery. Finally, we’ll show how to hook up your microservices to monitoring ...
Get Developing Open Cloud Native Microservices 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.