Upgrade to Pro — share decks privately, control downloads, hide ads and more …

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. Feature Flags
    Brad Broulik & Nick Marsh

    View Slide

  2. Feature
    Flag!
    https://me.me/i/do-not-push-button-temptation-do-you-really-want-to-15422537

    View Slide

  3. Agenda
    •What’s a feature flag
    •Why feature flags
    •Use cases
    •Demo
    •Feature flags at HealthPartners
    •Disadvantages

    View Slide

  4. 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.

    View Slide

  5. 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

    View Slide

  6. Use Cases

    View Slide

  7. Disable plan for me
    Enable my prescriptions
    Enable/Disable Features at Runtime
    Off
    On
    Deploy when you want, release when you’re ready

    View Slide

  8. Feature Flag Code
    Feature
    Check
    True
    False
    Off On

    View Slide

  9. 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

    View Slide

  10. Incremental Rollouts (dark launch)
    Feature
    80%
    40%
    10%
    100%
    Monitor
    performance, errors,
    usage metrics, rollback is
    simple, throttle rollout
    in real time

    View Slide

  11. 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)

    View Slide

  12. 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

    View Slide

  13. 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

    View Slide

  14. Feature Flag Management
    Open Source Commercial
    FF4J LaunchDarkly
    Togglz Split
    Flip
    Custom (properties,
    database)

    View Slide

  15. View Slide

  16. Feature Flags at HealthPartners
    Find Care
    Team Emerge Team
    Mobile Team Others?

    View Slide

  17. 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

    View Slide

  18. Load balancer
    Blue Green
    Off On
    HealthPartners
    Use case
    Blue/Green Deployments

    View Slide

  19. 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

    View Slide

  20. 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

    View Slide

  21. 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.

    View Slide

  22. https://funixx.wordpress.com/2012/07/19/do-not-push-button/
    Questions

    View Slide