This chapter covers
- Application health, or lack thereof, in a traditional 3-tier Java monolithic application architecture
- MicroProfile Health and exposing application health
- Exposing Account Service and Transaction Service application health
- Using Kubernetes probes to address application health issues
The combination of Kubernetes and the microservices architecture have caused a fundamental shift in how developers create applications. What used to be dozens of large monolithic applications are now becoming hundreds (or thousands) of smaller, more nimble microservice instances. The more application instances that are running, the larger the odds of an individual application instance failing. The increased odds of failure could be a significant challenge in production if application health is not a first-class concern in Kubernetes.
Let’s begin with a quick review of how monolithic applications running in application servers react to unhealthy applications.
Many enterprise Java developers have experience with Java application servers, dating back to the late 1990s. During most of that time, developers created monolithic 3-tier applications with little awareness of exposing an application’s health. From a developer’s perspective, monitoring an application’s health is the responsibility of system administrators whose livelihoods are to keep applications up and running in production.