The Dead Man's Switch Pattern in Microservices

In a world of ephemeral containers and distributed systems, "everything fails all the time." Standard health checks tell you if a service is reachable, but they don't tell you if it's working.

Health Checks vs. Heartbeats

A health check is a pull: The load balancer asks "Are you okay?". A heartbeat is a push: The service screams "I just finished a critical task!".

Implementing the Watchdog

For tasks like:

  • Weekly billing syncs
  • Daily backup uploads
  • Hourly cache invalidations

If these fail, a /health endpoint might still return 200 OK. By using CronRabbit as a Dead Man's Switch, you ensure that high-importance, low-frequency tasks are actually executing.