Chapter 16: Shipping and running

Deploying and releasing can be two different moments. That is the main idea of the next four words.

Feature flag

Also called Feature toggle, Kill switch, Percentage rollout

A condition in your code that turns something on or off, for some or all users, without a deploy. The code ships switched off, and you switch it on when you are ready.

If a release goes wrong, turning it off takes seconds and not a rollback. A percentage lets you try it on a few people first. The cost is real: each flag is a second version of your code, which has to be tested and later removed.

Say it to your agent

“Put the new checkout behind a flag called new-checkout, off by default, with a hash of the user id picking the percentage, so nobody flips between versions. Test it both on and off. Add a ticket, with an owner, to delete the flag within two weeks of reaching 100%.”

The workshop

Name a word, or describe what you mean in everyday language.