Delivery · · 6 min read

Ship every day without breaking production.

The safest teams release most often. Their secret is separating two things most companies treat as one: putting code into production, and letting customers see it.

By Precision Code Studios, Engineering team

In many companies a release is an event. There is a date, a freeze, a late evening, a long checklist and a shared sense of dread. Because releases are painful they are rare, and because they are rare each one carries months of changes, which makes it more likely to fail and harder to diagnose when it does. The fear is rational. The process creates the risk it is afraid of.

Teams that release many times a day are not braver. They have removed the thing that makes releases dangerous: the all-or-nothing moment.

Deploying is not releasing

A feature flag is a switch in the software, controlled from outside it. New code goes into production switched off. It is there, running in the real environment, but no customer can reach it. Turning it on is a separate decision, made later, for whichever group you choose, and reversed in a second if anything looks wrong.

A timeline of a rollout from deploy with the flag off, to staff, five percent, fifty percent and everyone
A typical progressive rollout. Each step is a decision, not an accident.

What that makes possible

  • Small, constant deployments. Unfinished work can ship safely behind a switch, so code never piles up waiting for a big day.
  • Gradual exposure. Staff first, then a few percent of customers, then everyone, widening only while errors and speed stay healthy.
  • An instant off switch. A problem is contained by flipping a flag, not by an emergency rollback at midnight.
  • Real experiments. Show two versions to similar groups and let behaviour, not opinion, pick the winner.
  • Control for the business. Marketing can choose the launch moment without asking engineering to hold a release.

Four kinds of flag, four lifetimes

  • Release flags hide work in progress. They should live for days or weeks, then be deleted.
  • Experiment flags compare alternatives. They end when the question is answered.
  • Operational flags are safety switches for heavy or risky features. These stay.
  • Permission flags give features to certain plans or customers. These are really product configuration.

The costs, honestly

Flags add paths through the code, and every path needs testing. Left alone they accumulate until nobody is sure which combinations are live, which is its own kind of debt. A flag must never be the only thing protecting sensitive data. And a flag hides a feature; it does not undo a database change, so changes to data need their own careful, reversible steps.

Getting started

  • Use a proper flag service. Hosted products and open-source tools both exist, and OpenFeature provides a common standard so you are not tied to one vendor.
  • Flag one real feature. Take it through staff, a small percentage and everyone, and practise switching it off.
  • Tie it to monitoring. A rollout is only safe if you can see what it is doing to errors and response times.
  • Clean up as a habit. Removing the flag is the last task of the feature, not an optional extra.

Release day should be the least interesting day of the month. When code flows into production continuously and reaches customers by deliberate, reversible steps, it is.

Keep reading

All insights