+91 98726 60544 hello@mitstech.co Mon–Sat · 09:00–18:30 IST

Feature flags and progressive delivery

IT Strategy By Mits Engineering Team 2 min read
Feature flags and progressive delivery

The single most useful idea in modern delivery is that deploying code and releasing a feature are different events. Deploy the code dark, behind a flag that is off. Turn it on for yourself, then for a few per cent of users, then for everyone - and turn it off in seconds if something is wrong. That decouples the risky moment from the deployment, and it is why teams that do this can deploy on a Friday afternoon without anyone becoming tense.

The immediate benefit is the kill switch. Rolling back a deployment takes minutes and reverts everything, including unrelated changes that were fine. Turning off a flag takes seconds and reverts one thing. When a feature misbehaves in production - and features do, because production has real users doing unanticipated things - the difference between those two response times is the difference between a blip and an incident.

It also enables progressive rollout, which is how you find problems that only appear at scale or with real data. One per cent of traffic, watch the error rate and latency for that cohort, then five, then twenty-five, then everyone. The requirement that makes this work is being able to measure the cohorts separately; a rollout you cannot observe is just a slower deployment.

The discipline that separates teams who benefit from this from teams who suffer is flag hygiene. Every flag is a branch in the code, and two flags interacting produce four paths, three produce eight. Left alone, a codebase accumulates dozens of permanently-on flags that nobody dares remove because nobody remembers what they controlled. Give every flag an owner and an expiry date at creation, and treat an expired flag as a bug.

Distinguish the types, because they have different lifetimes. Release flags exist to ship something and should be removed within weeks of full rollout. Operational flags - load-shedding switches, expensive-feature toggles - are permanent by design and that is fine. Experiment flags belong to a running test and die with it. Permission flags are not flags at all; they are your authorisation model and belong there instead.

One caution worth stating because it catches teams out: flags do not remove the need for backwards compatibility in data. If the flagged-off path and the flagged-on path write different shapes to the same table, turning the flag off does not undo the rows already written. Flags protect behaviour, not state - schema changes still need the expand-migrate-contract discipline underneath.

Need help with this? Explore our Software Development services. Learn more Back to all news

Keep reading

More on IT Strategy