Share
Embed
Be Gentle with your prod
Talk given with @odolbeau at the 2016 PHP Tour
Benjamin De Bernardi
May 24, 2016
Transcript
88 slides
-
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Benjamin de Bernardi & Olivier Dolbeau Benjamin de Bernardi & Olivier Dolbeau -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r @genes0r Lead Engineer Benjamin de Bernardi -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r @odolbeau Web Architect Olivier Dolbeau -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r 100€ 25€ 25€ 25€ 100€ 25€ -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r 15M 20M 10M 5M 1M 2015 2014 2013 2012 2011 2010 2009 25M members worldwide Over 25 million members and growing 1.5 million+ joining each month -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r 100+ people in the tech team -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Lots of projects... -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r A lot of features to test. -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Deploying big features is too risky. It can’t be done for everyone at the same time anymore. -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r It’s not always our fault! -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Medias -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Angry ops. -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r An angry ops is too dangerous! We need to find a solution to maintain the website up even when the traffic is high. -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Let’s define our needs. -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Deactivate a feature in production -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Activate a feature -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Slowly rollout a new feature -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Change A/B test configuration. -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Feature Y is only for 10% of the Italian users... Feature Y is only for 10% of the Italian users... Feature X is for France and maybe Belgium Feature X is for France and maybe Belgium ✓ ? 10% 10% -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Device agnostic -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r No deployement -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Feature flags Feature flags Feature flags Feature flags Feature flags -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r A 'Feature Flag' (or Feature Toggle) is the ability to turn features (sub- sections) of your application on/off at a moments notice. Wikipedia -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r What do we need? • a storage to store all feature flags and their rules • a admin interface to create / update / delete features flags • a PHP library to use in our application -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Existing solutions • etsy / features • joshuaestes / feature-toggle • opensoft / rollout • qandidate / toggle -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Existing solutions • etsy / features • joshuaestes / feature-toggle • opensoft / rollout • qandidate / toggle deprecated -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Existing solutions • etsy / features • joshuaestes / feature-toggle • opensoft / rollout • qandidate / toggle deprecated no storage logic -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Existing solutions • etsy / features • joshuaestes / feature-toggle • opensoft / rollout • qandidate / toggle deprecated no storage logic Good choice! -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Existing solutions • etsy / features • joshuaestes / feature-toggle • opensoft / rollout • qandidate / toggle deprecated no storage logic Good choice! Even better! -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r http://labs.qandidate. com/blog/2014/08/18/a-new-feature- toggling-library-for-php/ -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Meet Qandidate\Toggle -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Checking values: operators -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Context -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Putting it all together -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r http://labs.qandidate.com/blog/2014/08/19/ open-sourcing-our-feature-toggle-api-and-ui/ API UI -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r How it works for us? -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r What will we explain? Storages Operators & Context Strategies Devices Administration -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Storages -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Storages APCu Our own implementations. -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r • Primary data store • 1 key containing all toggles • 1 key / toggle containing its configuration (encoded JSON) -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r • Cache layer (60 seconds) • Encapsulation FTW • Encoded JSON APCu -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Strategies -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Strategies -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Operators -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r >= >= LessThan LessThanEqual MatchesRegex Percentage Available operators EqualsTo GreaterThan GreaterThanEqual InSet = [...] < %% % > -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r >= >= LessThan LessThanEqual MatchesRegex Percentage Available operators EqualsTo GreaterThan GreaterThanEqual InSet = [...] < %% % > -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Implementation -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Implementation - Context -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Implementation - Context Mainly focused on the user. -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Implementation - Context Can be website centric. -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Implementation - Context Can also be feature centric. -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Implementation - Manager -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Implementation - Views -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Implementation - Views -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Devices -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Mobile apps API Flags Native flags -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Internal Flags Export JSON Get JSON -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Internal Flags -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Name Internal Flags -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Strategy Internal Flags -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Conditions Internal Flags -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Context key Internal Flags -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Flaggr Open Source Android : blablacar/flaggr-android iOS : blablacar/flaggr-ios (soon) -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r We have 100+ toggles. -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r We can define toggles / devices -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Name Strategy Conditions summary Actions -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Example -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Rules : 1. Displayed in France only a. Will be activated for other countries later (BE, PL, NL) 2. Two kinds of results a. Beginners only b. Cheapest rides 3. Only for logged users 4. Activate for 50% of the users to control the impact -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Flag -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Implementation -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Feature flags? -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Yes. -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Questions? -
PHP Tour Clermont-Ferrand 2016 - Be gentle with your production
@odolbeau & @genes0r Thank you https://joind.in/talk/202e1 BlaBlaCar is hiring !