← Blog
Developer Guides 8 min read

Zero-Downtime Deployments: A Monitoring Perspective

Blue-green, canary, rolling — zero-downtime deployment strategies are well-documented. What's less discussed is the role monitoring plays in making them actually work. Without the right checks in place, you're flying blind during the most dangerous window in your deployment cycle.


Why deployments are your highest-risk window

Most production incidents happen during or immediately after a deployment. The reasons are predictable: new code with untested behavior, schema migrations that interact unexpectedly with running transactions, dependency version mismatches, or simply a bug that wasn't caught in staging.

Zero-downtime strategies reduce the blast radius of a bad deploy. But they don't eliminate risk — they change where and when that risk appears. Monitoring is what lets you detect and act on problems before they become full outages.


Blue-green deployments

In a blue-green setup, you run two identical environments (blue = current production, green = new version). You deploy to green, test it, then switch traffic. If green has problems, you switch back to blue.

The monitoring requirement: health checks that run against the green environment before traffic is switched. These checks need to verify not just that the app starts, but that it can actually serve requests correctly — including authenticated flows, database connectivity, and any external integrations.

Post-switch, your uptime monitors should detect problems within 1–2 minutes. If you're checking every 5 minutes, you have a 5-minute window where users can be affected before you know about it. For deployments, tighten your check intervals temporarily or use a deploy hook to trigger an immediate check after switching.


Canary deployments

Canary releases send a small percentage of traffic (1–10%) to the new version while the majority goes to the stable version. You monitor the canary for errors and performance degradation before promoting it to 100%.

The monitoring requirement: comparative metrics between the canary and the baseline. You need to know if the canary's error rate is higher, if its response times are worse, or if any specific endpoints are behaving differently.

Key signals to watch during a canary:

A canary that looks clean on uptime checks can still be silently degrading certain user flows. Monitor function, not just availability.


Rolling deployments

Rolling deployments replace instances one at a time, maintaining availability throughout. Unlike blue-green, there's no single switchover moment — old and new versions run simultaneously during the rollout.

The monitoring requirement: per-instance health checks and the ability to halt the rollout automatically if checks fail. Most orchestrators (Kubernetes, ECS, Fly.io) support rollout health checks — configure them to use your actual application health endpoint, not just a TCP ping.

During a rolling deploy, your uptime monitors should see continuous availability. Any blips — even brief ones that don't trigger your multi-confirmation threshold — are worth investigating. A monitor that normally shows 100% uptime showing two consecutive "confirmed" failures during a rolling deploy is a strong signal to halt and roll back.


Health check endpoints: getting them right

All three strategies depend on health check endpoints, and most implementations get them wrong. A health check that just returns 200 is almost useless for catching deployment regressions.

A useful health check endpoint should verify:

Return a structured JSON response with individual component statuses. That way, a failure tells you exactly what's broken — not just that something is broken.


The deploy monitoring workflow

  1. Before deploy: Note your baseline metrics. What are your current error rate and p95 response time? You need a clean baseline to compare against.
  2. During deploy: Watch your uptime monitors and error rate in real time. If your monitoring tool supports it, annotate the deployment event on your charts so you can correlate any changes.
  3. Immediately post-deploy: Trigger an immediate health check rather than waiting for the next scheduled interval. Verify the expected version is running.
  4. First 15 minutes post-deploy: This is your highest-risk window. Stay attentive. Many deployment bugs only manifest under real traffic, not synthetic checks.
  5. Rollback trigger: Define this before you deploy. "If error rate exceeds X% or p95 exceeds Yms in the 15 minutes after deploy, roll back." Having the threshold pre-defined removes the judgment call from a stressful moment.

Zero-downtime deployments are a process, not a feature. Monitoring is what makes the process trustworthy — it's how you validate that "zero downtime" was actually achieved, not just assumed.

Continue reading

Tools

10 Downtime Prevention Strategies for SaaS Teams

Operations

The Incident Management Playbook: From Alert to Resolution