health check
A regular automated test of whether a program or service is working, such as a request to its health endpoint or a command run inside its container.
In more detail
Orchestrators, load balancers and container runtimes use health checks to decide whether to send traffic to a service or restart it. A check only proves what it actually tests: a process can pass a check that measures itself while its real work fails.
Examples
Health checks decide whether a replica gets traffic or is replaced during a rolling update, but a scheduler can report healthy processes while users receive errors, so pair them with user-focused indicators.HEALTHCHECK CMD wget -qO- http://localhost:8000/health || exit 1Kubernetes splits health checks into liveness, readiness and startup probes.In the worked outage, a payment dependency times out while the health check stays green: "up" is not the same as "working".In this course: An integration test should wait until its dependency reports healthy before using it, instead of sleeping for an arbitrary time. For a database that usually means running a trivial query such as select 1.Related terms
- rolling update — Replacing instances of an application with the new version a few at a time while the rest keep serving.
- service level indicator — A measurement of how well a service is doing for users, usually good events divided by eligible events.
- depends_on — A Compose setting that makes one service start only after the services it needs.
- health endpoint — A web address, often /health, that a service answers quickly to show it is up.
- container status — The current state of a container as Docker reports it, such as created, running, exited or restarting.
- restart policy — A setting that tells Docker or Kubernetes whether to start a container again automatically after it exits.
- liveness probe — A health check that answers only whether a process is alive enough to keep running; if it keeps failing, the orchestrator, such as Kubernetes, restarts it.
- readiness probe — A check that decides whether a pod should receive traffic right now; failing it removes the pod from its Service without restarting it.
- startup probe — A check Kubernetes runs only while a container is starting, holding off the other probes until it passes.
- load balancer health check — A test a load balancer runs against each backend, such as opening a port or requesting a URL, to decide whether it should receive traffic.
- symptom-based alerting — Paging on what users feel, such as errors, slowness or unavailability, rather than on internal causes such as high CPU or a restarted process.
- load balancer — A server that spreads incoming requests across several copies of a service so no single copy is overloaded.
- fail open — What a security control does when it breaks or cannot decide: failing open lets the request through, while failing closed blocks it.
- failover — Switching work from a failed or unavailable system to a standby copy so the service keeps running.
- Testcontainers — A family of libraries that start real dependencies such as databases in throwaway containers for the length of a test.
- time.sleep — A function in the time module that pauses the program for a given number of seconds, which may be a fraction.
- integration test — A test that checks several real parts working together, such as the service talking to a real database.
Taught in
- Which Zone, Which Journey? — AWS Certified Cloud Practitioner (CLF-C02) Exam Prep
- Nine Jobs, Not Nine Servers — AWS Certified Cloud Practitioner (CLF-C02) Exam Prep
- The Public Subnet That Was Not — AWS Certified Cloud Practitioner (CLF-C02) Exam Prep
- Two Hundred Accounts And One Bad Deploy — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Strategies Across Compute: The Canary That Saw Nothing — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Systems Manager At Fleet Scale: Compliant And Unpatched — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- High Availability Across Tiers: What Fails Over By Itself? — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Scaling Patterns: When Capacity Arrives Too Late — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Collecting Logs And Metrics: The Disk Nobody Measured — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Troubleshooting Failed Deployments: Read The First Failure — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- The Full Mock And Your Review Plan — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- The Morning An Availability Zone Went Dark — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- Load Balancers And Auto Scaling: Capacity That Arrives On Time — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- Disaster Recovery By The Numbers — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- Route 53 Routing: Where Does A Fan In Lagos Land? — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- Sixteen Pods, Room For Twelve: The System, Feedback And Continuous — Certified GitOps Associate (CGOA) Exam Prep
- A Rollback Nobody Heard: Notifications, Observability And CI — Certified GitOps Associate (CGOA) Exam Prep
- Probes And Health Checks — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Port Binding And Concurrency — DevOps & Site Reliability Engineering
- Deployment Strategies: Rolling Updates — DevOps & Site Reliability Engineering
- Containers And Orchestration Context — DevOps & Site Reliability Engineering
- Commands, Logs, Exec And Exit Codes — Docker Architecture & Production Containers
- Run The Spine Service And Publish Its Port — Docker Architecture & Production Containers
- Multi Stage Builds, Targets And Build Secrets — Docker Architecture & Production Containers
- Environment, Secret Files And Runtime Restrictions — Docker Architecture & Production Containers
- Define The Service And Database With Compose — Docker Architecture & Production Containers
- Health Checks, Dependencies And Reliable Startup — Docker Architecture & Production Containers
- Development Overrides, Hot Reloading And Debuggers — Docker Architecture & Production Containers
- Integration Tests, Test Data And Compose Cleanup — Docker Architecture & Production Containers
- Diagnose Crashes, Resource Limits And Unhealthy Containers — Docker Architecture & Production Containers
- Build, Test And Promote The Same Image In CI — Docker Architecture & Production Containers
- Harden And Deliver The Complete Service Stack — Docker Architecture & Production Containers
- From Local Containers To Kubernetes — Docker Architecture & Production Containers
- Health Checks — Modern .NET Core, C# & Enterprise Microservices
- OpenTelemetry, Container Publishing and Trimming — Modern .NET Core, C# & Enterprise Microservices
- Health Probes & Graceful Shutdown: Kubernetes Lifecycles — Production Full-Stack Engineering
- Kubernetes Ingress, Routing & TLS Termination — Production Full-Stack Engineering
- Your First Program and go run — Concurrent Systems Programming with Go
- Serving HTTP with net/http Server — Concurrent Systems Programming with Go
- Shipping in Scratch and Distroless Images — Concurrent Systems Programming with Go
- Project Setup and Configuration — Concurrent Systems Programming with Go
- Executing Concurrent Checks — Concurrent Systems Programming with Go
- Handling Timeouts and Errors — Concurrent Systems Programming with Go
- Exporting Results as JSON — Concurrent Systems Programming with Go
- Containerizing and Testing the Final Build — Concurrent Systems Programming with Go
- Ports, Sockets And What Listening Means — Linux Fundamentals & Systems Administration
- Load Balancing: Algorithms, Health Checks And Layers — Linux Fundamentals & Systems Administration
- Cluster Architecture: node:cluster & Zero-Downtime — Node.js Internals & Backend Services
- Production Hardening: Graceful Shutdown & Docker — Node.js Internals & Backend Services
- Observability Versus Monitoring — Full-Stack Observability: Metrics, Tracing & Logging
- PromQL Basics And Selectors — Full-Stack Observability: Metrics, Tracing & Logging
- A Worked Example Postmortem — Full-Stack Observability: Metrics, Tracing & Logging
- Latency Numbers Every Engineer Should Know — Scalable System Design & Distributed Architecture
- The Storage Decision: Relational Versus Document — Scalable System Design & Distributed Architecture
- Replication, Failover And Leader Election — Scalable System Design & Distributed Architecture
- Caching Strategies And Topology — Scalable System Design & Distributed Architecture
- Queues, Events And Asynchronous Work — Scalable System Design & Distributed Architecture
- Load Balancing And The Failure Modes It Introduces — Scalable System Design & Distributed Architecture
- Timeouts, And Avoiding Cascaded Failure — Scalable System Design & Distributed Architecture
- Retries, Backoff And Jitter — Scalable System Design & Distributed Architecture
- Circuit Breakers — Scalable System Design & Distributed Architecture
- Backpressure And Load Shedding — Scalable System Design & Distributed Architecture
- Monolith Versus Services: The Honest Trade Offs — Scalable System Design & Distributed Architecture
- Observability As A Design Input — Scalable System Design & Distributed Architecture
- Worked Design One: Scaling The Ticket Booking System — Scalable System Design & Distributed Architecture
- Worked Design Two: Scaling Chat Fan Out — Scalable System Design & Distributed Architecture
- Worked Design Three: A Metrics Ingestion Pipeline — Scalable System Design & Distributed Architecture
- Integration Testing With Containers — Automated Testing, TDD & Quality Engineering
References
- Dockerfile reference: HEALTHCHECK
- Kubernetes: liveness, readiness and startup probes
- Kubernetes: Liveness, readiness and startup probes
- Dockerfile reference: HEALTHCHECK
- NGINX: using nginx as HTTP load balancer
- Google SRE book: monitoring distributed systems
- Amazon Builders' Library: Implementing health checks
- Envoy documentation: Health checking
- Envoy documentation: Outlier detection
- Application Load Balancer: Health checks for target groups
- Testcontainers: wait strategies
Certification courses
- AWS Cloud Practitioner course and practice exam: CLF-C02
- AWS DevOps Engineer Professional course and practice exam: DOP-C02
- AWS Solutions Architect Associate course and practice exam: SAA-C03
- CGOA course and practice exam: Certified GitOps Associate
- CKAD course and practice exam: Certified Kubernetes Application Developer