8 Supporting reliability with health checks and dependency checks

 

We’re on a journey toward making software production-ready in containers. You’ve already seen how straightforward it is to package apps in Docker images, run them in containers, and define multi-container apps with Docker Compose. In production you’ll run your apps in a container platform like Docker Swarm or Kubernetes, and those platforms have features that help you deploy self-healing apps. You can package your containers with information the platform uses to check if the application inside the container is healthy. If the app stops working correctly, the platform can remove a malfunctioning container and replace it with a new one.

In this chapter you’ll learn how to package those checks into your container images to help the platform keep your app online.

8.1 Building health checks into Docker images

Docker monitors the health of your app at a basic level every time you run a container. Containers run a specific process when they start, which could be the Java or .NET Core runtime, a shell script, or an application binary. Docker checks that the process is still running, and if it stops, the container goes into the exited state.

8.2 Starting containers with dependency checks

 

8.3 Writing custom utilities for application check logic

 
 
 

8.4 Defining health checks and dependency checks in Docker Compose

 
 

8.5 Understanding how checks power self-healing apps

 
 

8.6 Lab

 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest