How do you design healthchecks for liveness vs readiness when not on Kubernetes?
IntermediateProductionArchitecture & Design Decisions
Answer
Docker has one healthcheck, so separate meaning in the endpoint: /livez (process alive, no dependency checks) for restarts by a watcher, and /readyz (dependencies OK) for the load balancer to route traffic. Do not make liveness depend on the database; a DB blip would restart every app instance and make the outage worse.
More on Architecture & Design Decisions
How would you design a container build-and-deploy pipeline from commit to production?AdvancedWhen should you use Docker Compose, Swarm, ECS, or Kubernetes?IntermediateHow do you decide how many processes belong in one container?BeginnerHow do you design the config strategy for containerized apps (12-factor)?IntermediateHow would you containerize a legacy app that writes to local disk and holds sessions in memory?AdvancedAlpine or Debian-slim for a Python service?Intermediate