canary launches and feature flag-driven development

22
of teams practice continuous delivery 37% only * *https://www.perforce.com/pdf/continuous-delivery-report.pdf FEATURE FLAG-DRIVEN DEVELOPMENT John Kodumal

Upload: launchdarkly

Post on 17-Jan-2017

305 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Canary Launches and Feature Flag-Driven Development

of teams practice continuous delivery37%only *

*https://www.perforce.com/pdf/continuous-delivery-report.pdf

FEATURE FLAG-DRIVEN DEVELOPMENTJohn Kodumal

Page 2: Canary Launches and Feature Flag-Driven Development

collaborationlack of

Barriers

levelsskillemployee

automationlack of

Page 3: Canary Launches and Feature Flag-Driven Development

ENTER CANARY LAUNCHES

Page 4: Canary Launches and Feature Flag-Driven Development
Page 5: Canary Launches and Feature Flag-Driven Development
Page 6: Canary Launches and Feature Flag-Driven Development

MECHANISMS

Load balancer Feature flags

Page 7: Canary Launches and Feature Flag-Driven Development

ANATOMY OF A FEATURE FLAG

Page 8: Canary Launches and Feature Flag-Driven Development

IN CODE

new.signup

{ key: “[email protected]”, orgs: [“google”, “microsoft”], inBeta: true}

if ( ),

then/*show the new signup page */

else/*show the old signup page */

Page 9: Canary Launches and Feature Flag-Driven Development

USE CASES

• Risk mitigation

• Private betas

• Redundant cloud services

• Performance / load monitoring

• A/B testing and optimization

• Personalization

Page 10: Canary Launches and Feature Flag-Driven Development

FEATURE FLAG-DRIVEN DEVELOPMENT

1. Add a feature flag

2. Write some code

3. Launch and measure

4. Select winning variation, remove flag

5. Repeat for every code change

Page 11: Canary Launches and Feature Flag-Driven Development
Page 12: Canary Launches and Feature Flag-Driven Development

“ ”When a test goes out we look at the data immediately and adapt the products quickly. We do this on a daily basis. This cycle of iteration is the engine of progress and the people who use Facebook are not just the beneficiaries but are also intimately a part of the process. We don’t just develop this product for them, we develop it with them.

- Andrew Bosworth, Facebook

Page 13: Canary Launches and Feature Flag-Driven Development
Page 14: Canary Launches and Feature Flag-Driven Development

BEST PRACTICES

Page 15: Canary Launches and Feature Flag-Driven Development

Flag early, flag often

FLAG

Page 16: Canary Launches and Feature Flag-Driven Development

Think experimentally

Page 17: Canary Launches and Feature Flag-Driven Development

Remove flags diligently

Page 18: Canary Launches and Feature Flag-Driven Development

ANTI-PATTERNS

Page 19: Canary Launches and Feature Flag-Driven Development

Retro-flagging

Page 20: Canary Launches and Feature Flag-Driven Development

Flags via static configuration files

Page 21: Canary Launches and Feature Flag-Driven Development

“ ”Overall, engineers are treated as creative collaborators in the overall process with design and product, and products are worked out and iterated on with engineers instead of simply being handed to them for implementation.

- Chad Dickerson, Etsy

Page 22: Canary Launches and Feature Flag-Driven Development

AVAILABLE TOOLS• Togglez— Feature flags for the Java platform

• Waffle— Feature flags for Python / Django

• FeatureToggle— Feature flags for .NET

• Sixpack— Platform-agnostic A/B testing framework

• LaunchDarkly— SaaS platform for feature flags + A/B testing