Skip to content
14 providers 54 configurations
Independent reseller · not affiliated with any provider Telegram

Infrastructure

Blue-green and canary deployments in practice

Both reduce deployment risk. They ask for different things from your application and your database.

Blue-green and canary deployments in practice

Deploying by replacing running instances in place means every release has a window where failure is visible to users and rollback means another deploy. Blue-green and canary releases both remove that window, in different ways.

The two approaches

  • Blue-green

    Stand up a complete second environment, test it, switch traffic across at once. Rollback is switching back. Simple to reason about; you pay for two environments briefly.

  • Canary

    Send a small slice of traffic to the new version, watch the metrics, increase gradually. Catches problems that only appear under real traffic; requires good observability.

The database is the hard part

Both strategies assume old and new versions can run simultaneously against the same data. That constrains schema changes, and it is where most attempts come unstuck.

  1. Add new columns as nullable, with defaults. Never rename in one step.
  2. Deploy code that writes both old and new shapes while reading the old.
  3. Backfill existing rows in batches.
  4. Deploy code that reads the new shape.
  5. Once no version reads the old shape, remove it in a later release.

This expand-and-contract pattern takes several releases, which feels slow until the first time it lets you roll back a bad deploy instantly.

What to watch during a canary

Canary signals
Signal Why it matters
Error rate by version The most direct indicator; compare, do not eyeball.
Latency percentiles Averages hide the regression users notice.
Saturation New version may use more memory or connections per request.
Downstream error rates A change can overload a dependency.
A key business metric Technically healthy releases can still be wrong.

Which to choose

Blue-green suits releases where the change is large and you want a single clean switch. Canary suits frequent, incremental releases where subtle regressions matter more than dramatic ones. Many teams use blue-green for infrastructure changes and canary for application releases.

Summary

Pick the strategy that matches your release rhythm, make schema changes backwards compatible, and decide the abort criteria in advance. The deployment mechanism is straightforward; the data discipline is what makes it work.

Keep reading

More Cloud Insights

Next step

Find the account this article describes

Compare configurations by provider, with prices and full detail on every page.

Scroll to Top
Telegram