3. • Decoupling dev / deploying from releasing
✓ No manual / auto merge, less regression
• Version sync between src, tests, config, deploy scripts
• Pipeline management and monitor
• No data, schema migration and fallback, restore between
different branches on staging, pre-production env.
Complication
4. – LinkedIn senior VP for engineering Kevin Scott
“LinkedIn’s big switch to continuous deployment has been
linked to very concrete and visible financial success,… the
move to continuous deployment was about solving
concrete problems rather than spreading a doctrine.”
7. Release Toggle
• a.k.a: Application configuration based Toggles
• Using application configuration file (XML,
YAML or JSON) to switch ON or OFF selected
features.
{
"feature1": {"displayed": false},
"feature2": {"displayed": true},
"feature3": {"displayed": false}
}
8. • a.k.a: rule based toggle
• selectively turn on feature for certain classes of user
• use performance parameters like # of users,
average load time etc.
Business Toggle
✓ select users where friends.count > 1000 and set TIMELINE_FEATURE = ON
✓ set MINICART_FEATURE = OFF when live.users > 5,000
✓ set MINICART_FEATURE = OFF when loadTime > 5s
9. How it’s used
• for avoiding branching and merging (reduce risk)
• experimenting such as A/B tests
• test new features in a live production
• dark launch, phased rollout
• demo stakeholders new features without staging server
• turning a resources heavy feature OFF in high load conditions
• easier to roll-back when a new feature misbehave
22. CRUID Life-cycle
• Development team create toggles when required
• Application read or expose toggled feature when
they are switched ON
• Development team update toggled features when
they are buggy
• A semi-automated process to destroy or remove
toggles when job is done
23. - Remember that although simple conditionals are the
easiest way to implement a toggle, you should use
techniques like polymorphic substitution to minimize how
many points the toggle is tested.
- Release toggles are a useful technique and lots of teams
use them. However they should be your last choice when
you're dealing with putting features into production.
Your first choice should be to break the feature down so
you can safely introduce parts of the feature into the
product.
Feature Flags with Caution
24. • Decision object as constructor parameter
• Feature grouping and dependency
• Code duplication v.s. toggles #
• Require more coding skill and discipline
• Trunk is always in releasable status
✓ Test automation
Feature Flags with Caution
25. Feature Toggle Framework List
Feature Flags in Java
• Togglz, FF4J, Fitchy, Flip
Feature Flags in Python
• Gargoyle, Gutter
Feature Flags in Ruby and Ruby on Rails
• rollout, feature_flipper, flip
• setler, switches, fluidFeatures
Netflix OSS
• Archaius - polling framework