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

Feature Flags & You

Feature Flags & You

Given at BrooklynJS November 2017

Daniel Cousineau

November 16, 2017
Tweet

More Decks by Daniel Cousineau

Other Decks in Programming

Transcript

  1. View Slide

  2. View Slide

  3. 84 slides
    4 sections
    42 minutes

    View Slide

  4. View Slide

  5. Rule: Scale is bytes served, users concurrent

    View Slide

  6. Reality: Scale is responding to bytes served and
    users concurrent

    View Slide

  7. View Slide

  8. View Slide

  9. View Slide

  10. Reality: Scale is responding to bytes served and
    users concurrent

    View Slide

  11. How fast can you deploy a change?

    View Slide

  12. How fast can you FIX a change?

    View Slide

  13. How fast can you VALIDATE a change?

    View Slide

  14. View Slide

  15. Team 1
    Team 2
    Merge Feature A
    Merge Feature B
    Deploy
    Deploy
    OMG
    ROLLBACK
    DEPLOY!!!
    Merge Feature C
    Merge Bugfix for A
    Deploy
    Deploy BLOCKED!!!
    Deploy

    View Slide

  16. Feature Flags!

    View Slide

  17. View Slide

  18. View Slide

  19. If User has Feature:
    Show New Experience
    Else:
    Show Legacy Experience

    View Slide

  20. Feature Flags Divorce Rollout from Deployment

    View Slide

  21. Team 1
    Team 2
    Merge Feature A
    Merge Feature B
    Deploy
    Deploy
    Rollout Flag A
    Rollout Flag B
    OMG
    ROLLBACK
    FLAG
    A!!!
    Merge Feature C
    Deploy
    Merge Bugfix for A
    Deploy
    Rollout Flag A
    Rollout Flag C

    View Slide

  22. It Depends™ on your ENG and PROD teams!
    What is the scope of a Feature Flag?

    View Slide

  23. Feature Package Permission
    Implementation If/Else Gate If/Else Gate If/Else Gate
    Target Beta Cohort Client Tier Role / Org Chart
    Owner Prod / Eng Prod / Sales / CS Client

    View Slide

  24. Feature Flags are not Packages…
    Feature Flags are for new code…
    Feature Flags are temporary!

    View Slide

  25. 1.Feature is planned with PROD & ENG
    2.ENG creates flag, all new code behind flag
    3.ENG opens flag to feature devs
    4.ENG does code review, merges, deploys
    5.ENG opens flag to PROD
    6.PROD approves, begins rolling out live
    7.PROD confirms 100% successful rollout
    8.ENG & PROD schedules sprint for removal
    9.ENG removes old code & flag

    View Slide

  26. 1.At least 1 engineer codes with flag OFF
    2.All changes to existing code behind flag
    3.Rigorously QA with both flag ON and OFF
    4.Seriously, check that flag OFF still works
    5.No regressions!
    6.You will make this mistake.
    7.Did you make this mistake?
    8.Learn from it then do #1 and #3 again

    View Slide

  27. Build or Buy?

    View Slide

  28. 1.Retrieve flag by name…
    2.With current user details…
    3.And serve variations based on above…
    4.Accessible enough your PM can manage it.

    View Slide

  29. View Slide

  30. }>


    View Slide

  31. View Slide

  32. 1.Iterating faster is Good™!
    2.Optimize for inevitable rollbacks
    3.Feature flags solve for both
    4.I was wrong to hate them for so long

    View Slide

  33. View Slide