With feature toggle, A small portion of users with a specific flag go through the code of the new feature, while other users go through normal code. This can be used in combination of other strategies: either the new branch of code is upgraded in one go, or only a few instances are upgraded with new code.

  • No downtime
  • Targeted users

Disadvantage

  • If not managed properly, toggles can add complexity to the codebase and make testing more difficult.
  • obsolete toggles need to be cleaned up to prevent “toggle debt”, which can make the system increasingly hard to maintain.

Advantage

  • Offers excellent control over new features and allows for targeted user testing. It’s great for A/B testing or gradually rolling out a feature to see how it performs.