Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

Feature Flags

Feature Flags

Feature flags are ways to control the full lifecycle of your features. They allow you to manage components and minimize risk. You can do pretty cool things like roll out features to certain users, exclude groups from seeing a feature, A/B test, and much more. Basically, deploy when you want, release when you’re ready.

Brad Broulik

October 07, 2018
Tweet

More Decks by Brad Broulik

Other Decks in Programming

Transcript

  1. Agenda •What’s a feature flag •Why feature flags •Use cases

    •Demo •Feature flags at HealthPartners •Disadvantages
  2. What’s a Feature Flag? Use cases: •Turn features on/off (beta

    test) •Dark launch features (beta test with specific users) •Canary release •Incremental release •A/B test features •Change behavior of a feature at runtime Feature flags help manage the lifecycle of your features at runtime with the flip of a switch.
  3. Why Feature Flags? •Reduce risk •Continuous Delivery or Continuous Deployment

    •A/B testing •Calendar or time sensitive launches •Deploy when you want, release when you’re ready
  4. Disable plan for me Enable my prescriptions Enable/Disable Features at

    Runtime Off On Deploy when you want, release when you’re ready
  5. Canary Release (dark launch) Canary release is a technique to

    reduce the risk of introducing a new software version in production by slowly rolling out the change to a small subset of users before rolling it out to the entire infrastructure and making it available to everybody. Feature Feature Flag Target audience Off On Off
  6. Incremental Rollouts (dark launch) Feature 80% 40% 10% 100% Monitor

    performance, errors, usage metrics, rollback is simple, throttle rollout in real time
  7. Feature 6-10 AM Calendar-driven Launches 8:00 AM 6:00 AM 10:00

    AM 12:00 PM 4:00 AM 2:00 PM Time sensitive release (sale, promotion, experiment)
  8. Feature flags can present alternative user experiences for A/B testing

    exercises. For example, we could apply alternative workflows, icons, or content for a feature. A/B Testing A B
  9. Avoid Feature Branching Master Fork Feature branch #1 Merge Release

    Feature branch #2 Release Conflict Master Release Release Flickr doesn’t use feature branches and releases to production several times a day
  10. HealthPartners OAuth 2.0 HealthPartners OAuth 1.0 We were able to

    reduce risk by releasing OAuth 1.0 & 2.0 side-by- side and test 2.0 in isolation by whitelisting a few select testers Canary Release Fitbit Upgrade HealthPartners Use case
  11. Disadvantages •A feature flag becomes instant tech debt •Feature flag

    management can be complicated - knowing what a flag does and who owns it •Testing feature flags requires additional test scenarios •Triaging defects must take the state of the feature flag into consideration •Knight Capital went bankrupt in 45 minutes for misusing a feature flag and lost 460 million dollars
  12. Alternative Solutions •Manage features via a content management system -

    turn features on/off at the front door (buttons and links) •Manage features via fast continuous delivery pipeline releases
  13. Summary Use cases: •Turn features on/off (beta test) •Dark launch

    features (beta test with specific users): •Canary release •Incremental release •A/B test features •Change behavior of a feature at runtime •Deploy when you want, release when you’re ready Feature flags help manage the lifecycle of your features at runtime with the flip of a switch.