Feature Flag: Roll Out & Roll Back without Deployment
-
Upload
shin-kim -
Category
Technology
-
view
73 -
download
5
Transcript of Feature Flag: Roll Out & Roll Back without Deployment
Feature FlagRoll Out & Roll Back without Deployment
Feature Flag?New Feature On/Off
Index
1. Problems before Feature Flag
2. Benefits
3. Weak Points
4. Libraries
Problems before Feature Flag
Deployment == Roll Out
Deployment
before Feature Flag
Problem 0.No Test in Production
Test ENV != Prod ENV
Problem 1.Unclear Delivery
Time
From Click To Roll Out: Maybe.. 30 minutes
Problem 2.No Way to Dog
Fooding
QA => All Users
RollBack
before Feature Flag
Problem 3.Slow Delivery
From Click To Roll Out: Maybe.. 30 minutes
Solution.New Feature On/Off
to Some Users
One Click UI
Code Level
if FeatureFlag.active?('fetureFoo', user) c = a/belse c = b == 0 ? 0 : a/bend
Feature Flag Service
• Create if new flag is detected.• List flags.• Update a flag.• Delete too old flags.
Infrastructure
After Feature Flag
Deployment
after Feature Flag
Benefit 0.Test in Production
Benefit 1.Clear & Fast Delivery
Time
One Click & Real Time Roll Out
Benefit 2.Easy Dog Fooding
QA => Internal User => All
Rollback
After Feature Flag
Benefit 3.Fast Roll Back
One Click & Real Time Roll Back
Unexpected Benefit 4.
Simple A/B Test
Weak Points
• Uncooperative Members• Too Big Changes to Use Feature Flag• Obsoleted Feature Flags are Debts• Dependency on Each Feature Flags
No feature flag can be better
• Brand New API• Clear & Tiny Changes• Fixing a bug that makes something
worthless
Weak Point 0.Uncooperative
Members
Solution 0.Code Review!
No Flag No Merge
Weak Point 1.Too Big Changes
to use Feature Flag
Solution 1.Apply to End Point
Solution 1-0. in Method
if FeatureFlag.active?('fetureFoo', user) c = foo(1, 2)else c = deprecated_foo(1, 2)end
def foo(a,b) ... ...end
def deprecated_foo(a,b) ... ...end
Solution 1-0. in Classif FeatureFlag.active?('fetureFoo', user) c = Foo.new(1, 2)else c = DeprecatedFoo.new(1, 2)end
class Foo(a,b) ... ...end
class DeprecatedFoo(a,b) ... ...end
Solution 1-0. in HTML# Javascript<option ng-show=“FeatureFlag.is_active(‘fetureFoo', user)" value="foo1"/><option ng-hide=“FeatureFlag.is_active('fetureFoo', user)" value="foo2"/>
# Server Rendering<% if FeatureFlag.active?('fetureFoo', user) %> <option value="foo1"/><% else %> <option value="foo2"/><% end %>
Weak Point 2.Obsoleted Feature Flags are
Debts
Solution 2.Clean Up in The
Sprint
Weak Point 3.Dependency on Each
Feature FlagFeature Flag in Feature Flag in Feature Flag in …
Libraries
• rollout for Ruby• Gutter for Python• Togglez for java
Reference• https://martinfowler.com/articles/feature-
toggles.html• https://martinfowler.com/bliki/
FeatureToggle.html• https://msdn.microsoft.com/en-us/
magazine/dn683796• http://apptimize.com/feature-flags-launch/
Q & A