Pro Yearly is on sale from $80 to $50! »

Feature Flags & You

Feature Flags & You

Given at BrooklynJS November 2017

6696617169722009ed1ec8c52496c6da?s=128

Daniel Cousineau

November 16, 2017
Tweet

Transcript

  1. None
  2. None
  3. 84 slides 4 sections 42 minutes

  4. None
  5. Rule: Scale is bytes served, users concurrent

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

  7. None
  8. None
  9. None
  10. Reality: Scale is responding to bytes served and users concurrent

  11. How fast can you deploy a change?

  12. How fast can you FIX a change?

  13. How fast can you VALIDATE a change?

  14. None
  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
  16. Feature Flags!

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

    Experience
  20. Feature Flags Divorce Rollout from Deployment

  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
  22. It Depends™ on your ENG and PROD teams! What is

    the scope of a Feature Flag?
  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
  24. Feature Flags are not Packages… Feature Flags are for new

    code… Feature Flags are temporary!
  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
  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
  27. Build or Buy?

  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.
  29. None
  30. <Feature name="new-feature" fallback={<OldFeatureComponent />}> <NewFeatureComponent /> </Feature>

  31. None
  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
  33. None