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

Elevate_23_Advanced_FF_Usecases.pdf

Joy Ebertz
March 08, 2023
29

 Elevate_23_Advanced_FF_Usecases.pdf

Joy Ebertz

March 08, 2023
Tweet

Transcript

  1. © 2022 Split Software, Inc. Joy Ebertz Principal Engineer Feature

    Flag Use Cases You Haven't Heard About Yet
  2. © 2022 Split Software, Inc. Agenda ▸ What are feature

    flags? ▸ Typical Use Cases ▸ Removing Dead Code ▸ Load/Stress Testing ▸ Evaluating Tech Costs ▸ Parity Testing ▸ Logging
  3. © 2022 Split Software, Inc. Other Terms • Feature Toggle

    • Feature Flip • Feature Switch • Conditional Feature
  4. © 2022 Split Software, Inc. Other Terms • Feature Toggle

    • Feature Flip • Feature Switch • Conditional Feature • Split
  5. © 2022 Split Software, Inc. Code Sample if (Treatments.ON .equals(_splitClient.getTreatment(orgId,

    Splits.MY_FEATURE.name()))) { // Do Something } else { // Do Something Else }
  6. © 2022 Split Software, Inc. Code Sample if (Treatments.ON .equals(_splitClient.getTreatment(orgId,

    Splits.MY_FEATURE.name()))) { // Do Something } else { // Do Something Else }
  7. © 2022 Split Software, Inc. Typical Use-Cases • Releasing features

    • Production Testing • A/B/C Testing • Custom Packages
  8. © 2022 Split Software, Inc. Typical Use-Cases • Releasing features

    • Production Testing • A/B/C Testing • Custom Packages • Temporary UI Customization
  9. © 2022 Split Software, Inc. Typical Use-Cases • Releasing features

    • Production Testing • A/B/C Testing • Custom Packages • Temporary UI Customization
  10. © 2022 Split Software, Inc. Releasing Features • Separating Deploy

    from Release • Canary/Ramped Release • Off Switch
  11. © 2022 Split Software, Inc. Method no longer referenced Parameter

    never has certain values Endpoint never called Why is your code dead?
  12. © 2022 Split Software, Inc. private void logForCleanup(String orgId, String

    uid) { if (Treatments.ON .equals(_splitClient.getTreatment(orgId, Splits.CLEANUP.name()))) { String message = String.format(“CODE NOT DEAD UID: %s”, uid); log.info(message); } }
  13. © 2022 Split Software, Inc. private void logForCleanup(String orgId, String

    uid) { if (Treatments.ON .equals(_splitClient.getTreatment(orgId, Splits.CLEANUP.name()))) { String message = String.format(“CODE NOT DEAD UID: %s”, uid); log.info(message); } } Turn on CLEANUP feature flag to 1%
  14. © 2022 Split Software, Inc. 1. Roll out to 1%

    2. Remove any log lines hit 3. Roll out to 5%
  15. © 2022 Split Software, Inc. 1. Roll out to 1%

    2. Remove any log lines hit 3. Roll out to 5% 4. Remove any log lines hit
  16. © 2022 Split Software, Inc. 1. Roll out to 1%

    2. Remove any log lines hit 3. Roll out to 5% 4. Remove any log lines hit 5. Roll out to 100% …
  17. © 2022 Split Software, Inc. 1. Roll out to 1%

    2. Remove any log lines hit 3. Roll out to 5% 4. Remove any log lines hit 5. Roll out to 100% 6. Remove any code that hasn’t been hit … …
  18. © 2022 Split Software, Inc. Feature Flag Parity Check Log

    if different Requests Old System New System
  19. © 2022 Split Software, Inc. Feature Flag Parity Check Log

    if different Requests Old System New System
  20. © 2022 Split Software, Inc. Only certain users/organizations Only certain

    profile types (or other user attribute) Only certain classes
  21. © 2022 Split Software, Inc. Recap ▸ What are feature

    flags? ▸ Typical Use Cases ▸ Removing Dead Code ▸ Load/Stress Testing ▸ Evaluating Tech Costs ▸ Parity Testing ▸ Logging
  22. © 2022 Split Software, Inc. Further Reading • My blog

    on this topic: https://www.split.io/blog/5-advanced-feature- flag-uses/ • Some ways we use feature flags: https://www.split.io/blog/feature-flags-at-split/ • More about feature flags generally: https://martinfowler.com/articles/feature- toggles.html
  23. © 2022 Split Software, Inc. Image Credits • Elephant by

    Dmitry Abramov on https://pixabay.com • Server by Mohamed Hassan from Pixabay • Logs Photo by Radek Grzybowski on Unsplash • Heartbeat by Clker-Free-Vector-Images from Pixabay • Zombie Photo by julien Tromeur on Unsplash • Typewriter from https://undraw.co/license • Flagging image owned by Split • Dam Photo by Marcus Woodbridge on Unsplash • Twitter fail whale by https://www.yiyinglu.com/ • All others are PowerPoint Icons