SlideShare a Scribd company logo
Feature Flags. Reducing risks
during shipping changes
Aleksandr Makhomet
Upwork
http://twitter.com/amahomet
https://www.facebook.com/alexander.mahomet
Feature Flags concept.
Feature Flags Concept
● The basic idea is to have a configuration that defines a bunch
of toggles for various features you have pending. The running
application then uses these flags in order to decide whether or
not to show the new feature. © Martin Fowler
● Other names: feature toggles, feature bits, flags, flippers,
conditional features
{% if feature_is_enabled('AwesomeRedButtons') %}
<p>Awesome Feature is enabled</p>
{% else %}
<p>Old boring blue buttons</p>
{% endif %}
Feature Flags ideas
● Gradual rollout
● Safe rollback
● Less feature branches
Gradual rollout
● Dark launching
● Easy to enable for a specific number of
users, even for yourself only
Gradual rollout
● Easy to revert if metrics are not good
● Automatic disabling in case of spikes
Less Feature Branches
● Less merge/integration hell
● Trunk based development
● Easy to mix branches
● Essential to Continuous Integration
approach
Who does use Feature Flags
● Google
● Flickr
● Asana
● Travis
● Rally
● More and more
Feature Flags in Upwork
What is Upwork.com
• Formerly odesk.com
• Upwork has nine million registered freelancers and
four million registered clients. Three million jobs
are posted annually, worth a total of $1 billion
USD, making it the world's largest freelancer
marketplace.
• Highload. Microservice architecture
Feature Flags. Our choise.
● Gradual rollout - Yes
● Graceful degradation - Yes
● Replace feature branches - Not yet
Implementation. Prerequisites
● As simple as possible
● Platform agnostic
Configuration file
● INI format
● Each feature has code name
● Naming convention
● GIT is used
● Each change should be reviewed
● Validation script
ShowMickeyMouseOnHomePage.enabled = false
Meta data
● Title
● Description
● Owner
● Responsible Team
● Reference Url
● Permanent
Constraints
● Internal users
● Percent of users (1%, 5%, 30%, 50%, 100%)
○ Random within 0 - 100% but constant
per user
● Percent of companies
Create any constraints useful for for your
project
How do we update flags
● False for start
● Gradual update using Etsy Deployinator
○ Staging -> Production
(including validation check)
● App servers update
● Placing configuration file to s3 storage
How do we use it in PHP
● Take from S3 Cache to APC and create a backup local
version.
● Service and Twig function
if ($this->container->get('feature')->isEnabled('Feature')) {
// do something ...
}
{% if feature_is_enabled('Feature') %}
<p>Feature is enabled</p>
{% endif %}
● For more information watch and read Benjamin Eberlei -
presentation “Feature Flags with Symfony”
Feature flags Audit
● Important to have visibility on changes
● Git history
● Write logs and send notification to
chat/email/etc when you deploy
Cleanup
● Cleanup as soon as feature is stable
● Keep number of conditions invasions
small
● Create follow-up ticket to not forget to
remove
● You can try to make cleanup fun :)
Testing
● Feature Flags could complicate testing
● Unit tests
○ Just mock dependencies
● Integration/Functional tests
We test combinations which should reasonably be expected to
happen in production
Feature Flags admin UI
● Important to have visibility on feature
flags statuses
● Such UI should provide readable list of
feature flags with possibility to search/
filter/sort etc
● We use it for enabling feature for current
session
FF lifecycle
● Add feature flag to config with disabled status
● Write code. Test your code in branch with
enabled feature flag.
● Release code
● Enable feature for your own user. Check it
● Enable for internal users. Check it
● Gradual enabling for group of users. Monitoring
● Enable feature for 100% of users. Monitoring
● If everything is fine - cleanup feature flag if it is
not permanent.
Feature Flags and A/B testing
● A/B testing is a kind of randomized
experiment with two variants, A and B.
● Feature flags approach is actually an A/B
testing
● A/B testing system could be much more
powerful
● We separated these systems
Side effects and
recommendations
Feature Flags problems
● Increase complexity and decrease the
readability of code
● Accidental exposure
● Increases complexity of testing
Feature Flags. Recommendations. Part 1
● Keep FF implementation simple and
modularized
● Use feature flags at minimum amount of
points, avoid very invasive cases
● Avoid mixing feature flags
● Do monitoring
● Be careful with partial enabling many
features at one time
Feature Flags. Recommendations. Part 2
● Reduce number of permanent feature flags
● Do cleanup as soon as possible
● Don’t leave code in the mainline just in case
you might need it again some day.
● Changes involving data migrations must be
handled with care
● Create clear guidelines, describing your
approach, including section like “when to use
toggles or not”
Conclusions
● Feature flags are very handy to roll out new
features gradually, but they also give you higher
control over your system running in production as
well.
● On top of that, they give you a means to disable
certain features during a production incident.
● At the same time this approach brings new
challenges. So decision is up to you, as always :)
More cool reading
General cool tech reading
● http://code.flickr.net/
● https://codeascraft.com (Etsy, Rasmus Lerdorf)
● https://www.rallydev.com/blog/engineering
● https://blog.asana.com/eng/
Feature flags related reading
● http://code.flickr.net/2009/12/02/flipping-out/
● http://martinfowler.com/bliki/FeatureToggle.html
● https://www.youtube.com/watch?v=KJKSCbYrNvY
(Benjamin Eberlei - Feature Flags with Symfony)
● http://blog.travis-ci.com/2014-03-04-use-feature-flags-to-ship-changes-with-confidence/
● https://blog.asana.com/2011/04/using-flags-to-ease-new-feature-development/
● https://www.rallydev.com/blog/authors/ryan-scott?page=1 (4 articles)
● http://swreflections.blogspot.com/2014/08/feature-toggles-are-one-of-worst-kinds.html
Le Fin
Questions?
Aleksandr Makhomet
http://twitter.com/amahomet
https://www.facebook.com/alexander.
mahomet

More Related Content

What's hot

What's hot (20)

How to deploy a Java application on Google App engine Flexible environment
How to deploy a Java application on Google App engine Flexible environmentHow to deploy a Java application on Google App engine Flexible environment
How to deploy a Java application on Google App engine Flexible environment
 
Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"
 
Code quality par Simone Civetta
Code quality par Simone CivettaCode quality par Simone Civetta
Code quality par Simone Civetta
 
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
 
Jenkins 101: Continuos Integration with Jenkins
Jenkins 101: Continuos Integration with JenkinsJenkins 101: Continuos Integration with Jenkins
Jenkins 101: Continuos Integration with Jenkins
 
Creando microservicios con Java y Microprofile - Nicaragua JUG
Creando microservicios con Java y Microprofile - Nicaragua JUGCreando microservicios con Java y Microprofile - Nicaragua JUG
Creando microservicios con Java y Microprofile - Nicaragua JUG
 
Ansible & Vagrant
Ansible & VagrantAnsible & Vagrant
Ansible & Vagrant
 
Meetup React Sanca - 29/11/18 - React Testing
Meetup React Sanca - 29/11/18 - React TestingMeetup React Sanca - 29/11/18 - React Testing
Meetup React Sanca - 29/11/18 - React Testing
 
[Nuxeo World 2013] XML EXTENSION POINT COMPLETION IN NUXEO IDE - SUN TAN, SERLI
[Nuxeo World 2013] XML EXTENSION POINT COMPLETION IN NUXEO IDE - SUN TAN, SERLI[Nuxeo World 2013] XML EXTENSION POINT COMPLETION IN NUXEO IDE - SUN TAN, SERLI
[Nuxeo World 2013] XML EXTENSION POINT COMPLETION IN NUXEO IDE - SUN TAN, SERLI
 
Graphql usage
Graphql usageGraphql usage
Graphql usage
 
Testing of React JS app
Testing of React JS appTesting of React JS app
Testing of React JS app
 
Salt and pepper — native code in the browser Browser using Google native Client
Salt and pepper — native code in the browser Browser using Google native ClientSalt and pepper — native code in the browser Browser using Google native Client
Salt and pepper — native code in the browser Browser using Google native Client
 
Performance Profiling Tools and Tricks
Performance Profiling Tools and TricksPerformance Profiling Tools and Tricks
Performance Profiling Tools and Tricks
 
Java concurrency
Java concurrencyJava concurrency
Java concurrency
 
Composer
ComposerComposer
Composer
 
Gitlab flow solo
Gitlab flow soloGitlab flow solo
Gitlab flow solo
 
Cypress for Testing
Cypress for TestingCypress for Testing
Cypress for Testing
 
Building Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & AzureBuilding Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & Azure
 
OSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshopOSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshop
 
"Wix Serverless from inside", Mykola Borozdin
"Wix Serverless from inside", Mykola Borozdin"Wix Serverless from inside", Mykola Borozdin
"Wix Serverless from inside", Mykola Borozdin
 

Viewers also liked

4 puchnina.pptx
4 puchnina.pptx4 puchnina.pptx
4 puchnina.pptx
Fwdays
 
"Красная книга веб-разработчика" Виктор Полищук
"Красная книга веб-разработчика" Виктор Полищук"Красная книга веб-разработчика" Виктор Полищук
"Красная книга веб-разработчика" Виктор Полищук
Fwdays
 
Сергей Яковлев "Phalcon 2 - стабилизация и производительность"
Сергей Яковлев "Phalcon 2 - стабилизация и производительность"Сергей Яковлев "Phalcon 2 - стабилизация и производительность"
Сергей Яковлев "Phalcon 2 - стабилизация и производительность"
Fwdays
 
Michael North "The Road to Native Web Components"
Michael North "The Road to Native Web Components"Michael North "The Road to Native Web Components"
Michael North "The Road to Native Web Components"
Fwdays
 

Viewers also liked (20)

"Spring Boot. Boot up your development" Сергей Моренец
"Spring Boot. Boot up your development" Сергей Моренец"Spring Boot. Boot up your development" Сергей Моренец
"Spring Boot. Boot up your development" Сергей Моренец
 
Илья Прукко: "Как дизайнеру не становиться художником"
Илья Прукко: "Как дизайнеру не становиться художником"Илья Прукко: "Как дизайнеру не становиться художником"
Илья Прукко: "Как дизайнеру не становиться художником"
 
Светлана Старикова "Building a self-managing team: why you should not have e...
 Светлана Старикова "Building a self-managing team: why you should not have e... Светлана Старикова "Building a self-managing team: why you should not have e...
Светлана Старикова "Building a self-managing team: why you should not have e...
 
Fighting Fat Models (Богдан Гусев)
Fighting Fat Models (Богдан Гусев)Fighting Fat Models (Богдан Гусев)
Fighting Fat Models (Богдан Гусев)
 
4 puchnina.pptx
4 puchnina.pptx4 puchnina.pptx
4 puchnina.pptx
 
"Красная книга веб-разработчика" Виктор Полищук
"Красная книга веб-разработчика" Виктор Полищук"Красная книга веб-разработчика" Виктор Полищук
"Красная книга веб-разработчика" Виктор Полищук
 
Сергей Яковлев "Phalcon 2 - стабилизация и производительность"
Сергей Яковлев "Phalcon 2 - стабилизация и производительность"Сергей Яковлев "Phalcon 2 - стабилизация и производительность"
Сергей Яковлев "Phalcon 2 - стабилизация и производительность"
 
Александр Воронов | Building CLI with Swift
Александр Воронов | Building CLI with SwiftАлександр Воронов | Building CLI with Swift
Александр Воронов | Building CLI with Swift
 
Алексей Волков "Интерактивные декларативные графики на React+D3"
Алексей Волков "Интерактивные декларативные графики на React+D3"Алексей Волков "Интерактивные декларативные графики на React+D3"
Алексей Волков "Интерактивные декларативные графики на React+D3"
 
"Query Execution: Expectation - Reality (Level 300)" Денис Резник
"Query Execution: Expectation - Reality (Level 300)" Денис Резник"Query Execution: Expectation - Reality (Level 300)" Денис Резник
"Query Execution: Expectation - Reality (Level 300)" Денис Резник
 
Анастасия Войтова: "Building profanity filters on mobile: clbuttic sh!t"
Анастасия Войтова: "Building profanity filters on mobile: clbuttic sh!t"Анастасия Войтова: "Building profanity filters on mobile: clbuttic sh!t"
Анастасия Войтова: "Building profanity filters on mobile: clbuttic sh!t"
 
Lightweight APIs in mRuby (Михаил Бортник)
Lightweight APIs in mRuby (Михаил Бортник)Lightweight APIs in mRuby (Михаил Бортник)
Lightweight APIs in mRuby (Михаил Бортник)
 
Анатолий Попель: "Формы оплаты и платёжные шлюзы"
Анатолий Попель: "Формы оплаты и платёжные шлюзы"Анатолий Попель: "Формы оплаты и платёжные шлюзы"
Анатолий Попель: "Формы оплаты и платёжные шлюзы"
 
Алексей Рыбаков: "Wearable OS год спустя: Apple Watch 2.0, Android Wear 5.1.1...
Алексей Рыбаков: "Wearable OS год спустя: Apple Watch 2.0, Android Wear 5.1.1...Алексей Рыбаков: "Wearable OS год спустя: Apple Watch 2.0, Android Wear 5.1.1...
Алексей Рыбаков: "Wearable OS год спустя: Apple Watch 2.0, Android Wear 5.1.1...
 
"После OOD: как моделировать предметную область в пост-объектном мире" Руслан...
"После OOD: как моделировать предметную область в пост-объектном мире" Руслан..."После OOD: как моделировать предметную область в пост-объектном мире" Руслан...
"После OOD: как моделировать предметную область в пост-объектном мире" Руслан...
 
Michael North "The Road to Native Web Components"
Michael North "The Road to Native Web Components"Michael North "The Road to Native Web Components"
Michael North "The Road to Native Web Components"
 
Швейцарія, масштабування Scrum і розподілені команди от Романа Сахарова
Швейцарія, масштабування Scrum і розподілені команди от Романа СахароваШвейцарія, масштабування Scrum і розподілені команди от Романа Сахарова
Швейцарія, масштабування Scrum і розподілені команди от Романа Сахарова
 
"Frameworks in 2015" Андрей Листочкин
"Frameworks in 2015" Андрей Листочкин"Frameworks in 2015" Андрей Листочкин
"Frameworks in 2015" Андрей Листочкин
 
Евгений Жарков AngularJS: Good parts
Евгений Жарков AngularJS: Good partsЕвгений Жарков AngularJS: Good parts
Евгений Жарков AngularJS: Good parts
 
Андрей Шумада | Tank.ly
Андрей Шумада | Tank.ly Андрей Шумада | Tank.ly
Андрей Шумада | Tank.ly
 

Similar to Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений"

Gatling - Bordeaux JUG
Gatling - Bordeaux JUGGatling - Bordeaux JUG
Gatling - Bordeaux JUG
slandelle
 
Feature Toggles
Feature TogglesFeature Toggles
Feature Toggles
Devi Sridharan
 
Hybrid Automation Framework Developement
Hybrid Automation Framework DevelopementHybrid Automation Framework Developement
Hybrid Automation Framework Developement
Glasdon Falcao
 

Similar to Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений" (20)

Feature toggling
Feature togglingFeature toggling
Feature toggling
 
Trunk based development
Trunk based developmentTrunk based development
Trunk based development
 
Launch safely with Feature Flags
Launch safely with Feature FlagsLaunch safely with Feature Flags
Launch safely with Feature Flags
 
Feature toggles
Feature togglesFeature toggles
Feature toggles
 
Merge hells - Feature Toggles to the rescue
Merge hells - Feature Toggles to the rescueMerge hells - Feature Toggles to the rescue
Merge hells - Feature Toggles to the rescue
 
Gatling - Bordeaux JUG
Gatling - Bordeaux JUGGatling - Bordeaux JUG
Gatling - Bordeaux JUG
 
Gatling
Gatling Gatling
Gatling
 
Performance Test Automation With Gatling
Performance Test Automation  With GatlingPerformance Test Automation  With Gatling
Performance Test Automation With Gatling
 
Feature Toggles
Feature TogglesFeature Toggles
Feature Toggles
 
Software management for tech startups
Software management for tech startupsSoftware management for tech startups
Software management for tech startups
 
Hybrid Automation Framework Developement
Hybrid Automation Framework DevelopementHybrid Automation Framework Developement
Hybrid Automation Framework Developement
 
Katalon Studio - A Codeless Automation Tool.pdf
Katalon Studio - A Codeless Automation Tool.pdfKatalon Studio - A Codeless Automation Tool.pdf
Katalon Studio - A Codeless Automation Tool.pdf
 
Feature Toggle
Feature ToggleFeature Toggle
Feature Toggle
 
KSCOPE 2015 - Improving Reliability, Rollouts, Upgrades/Migrations
KSCOPE 2015 - Improving Reliability, Rollouts, Upgrades/MigrationsKSCOPE 2015 - Improving Reliability, Rollouts, Upgrades/Migrations
KSCOPE 2015 - Improving Reliability, Rollouts, Upgrades/Migrations
 
Bulletproof design systems using storybook
Bulletproof design systems using storybookBulletproof design systems using storybook
Bulletproof design systems using storybook
 
Debug, Analyze and Optimize Games with Intel Tools
Debug, Analyze and Optimize Games with Intel Tools Debug, Analyze and Optimize Games with Intel Tools
Debug, Analyze and Optimize Games with Intel Tools
 
Debug, Analyze and Optimize Games with Intel Tools - Matteo Valoriani - Codem...
Debug, Analyze and Optimize Games with Intel Tools - Matteo Valoriani - Codem...Debug, Analyze and Optimize Games with Intel Tools - Matteo Valoriani - Codem...
Debug, Analyze and Optimize Games with Intel Tools - Matteo Valoriani - Codem...
 
Debug, Analyze and Optimize Games with Intel Tools - Matteo Valoriani - Codem...
Debug, Analyze and Optimize Games with Intel Tools - Matteo Valoriani - Codem...Debug, Analyze and Optimize Games with Intel Tools - Matteo Valoriani - Codem...
Debug, Analyze and Optimize Games with Intel Tools - Matteo Valoriani - Codem...
 
Ui Testing with Ghost Inspector
Ui Testing with Ghost InspectorUi Testing with Ghost Inspector
Ui Testing with Ghost Inspector
 
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
 Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
 

More from Fwdays

More from Fwdays (20)

"What I learned through reverse engineering", Yuri Artiukh
"What I learned through reverse engineering", Yuri Artiukh"What I learned through reverse engineering", Yuri Artiukh
"What I learned through reverse engineering", Yuri Artiukh
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
"Micro frontends: Unbelievably true life story", Dmytro Pavlov
"Micro frontends: Unbelievably true life story", Dmytro Pavlov"Micro frontends: Unbelievably true life story", Dmytro Pavlov
"Micro frontends: Unbelievably true life story", Dmytro Pavlov
 
"Objects validation and comparison using runtime types (io-ts)", Oleksandr Suhak
"Objects validation and comparison using runtime types (io-ts)", Oleksandr Suhak"Objects validation and comparison using runtime types (io-ts)", Oleksandr Suhak
"Objects validation and comparison using runtime types (io-ts)", Oleksandr Suhak
 
"JavaScript. Standard evolution, when nobody cares", Roman Savitskyi
"JavaScript. Standard evolution, when nobody cares", Roman Savitskyi"JavaScript. Standard evolution, when nobody cares", Roman Savitskyi
"JavaScript. Standard evolution, when nobody cares", Roman Savitskyi
 
"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y..."How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
"How Preply reduced ML model development time from 1 month to 1 day",Yevhen Y...
 
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
"GenAI Apps: Our Journey from Ideas to Production Excellence",Danil Topchii
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
"What is a RAG system and how to build it",Dmytro Spodarets
"What is a RAG system and how to build it",Dmytro Spodarets"What is a RAG system and how to build it",Dmytro Spodarets
"What is a RAG system and how to build it",Dmytro Spodarets
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"Distributed graphs and microservices in Prom.ua", Maksym Kindritskyi
"Distributed graphs and microservices in Prom.ua",  Maksym Kindritskyi"Distributed graphs and microservices in Prom.ua",  Maksym Kindritskyi
"Distributed graphs and microservices in Prom.ua", Maksym Kindritskyi
 
"Rethinking the existing data loading and processing process as an ETL exampl...
"Rethinking the existing data loading and processing process as an ETL exampl..."Rethinking the existing data loading and processing process as an ETL exampl...
"Rethinking the existing data loading and processing process as an ETL exampl...
 
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T..."How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...
 
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ..."The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
 
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu..."[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
 
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care..."[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
 
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"..."4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
 

Recently uploaded

Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 

Recently uploaded (20)

IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 

Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений"

  • 1. Feature Flags. Reducing risks during shipping changes Aleksandr Makhomet Upwork http://twitter.com/amahomet https://www.facebook.com/alexander.mahomet
  • 3. Feature Flags Concept ● The basic idea is to have a configuration that defines a bunch of toggles for various features you have pending. The running application then uses these flags in order to decide whether or not to show the new feature. © Martin Fowler ● Other names: feature toggles, feature bits, flags, flippers, conditional features {% if feature_is_enabled('AwesomeRedButtons') %} <p>Awesome Feature is enabled</p> {% else %} <p>Old boring blue buttons</p> {% endif %}
  • 4. Feature Flags ideas ● Gradual rollout ● Safe rollback ● Less feature branches
  • 5. Gradual rollout ● Dark launching ● Easy to enable for a specific number of users, even for yourself only
  • 6. Gradual rollout ● Easy to revert if metrics are not good ● Automatic disabling in case of spikes
  • 7. Less Feature Branches ● Less merge/integration hell ● Trunk based development ● Easy to mix branches ● Essential to Continuous Integration approach
  • 8. Who does use Feature Flags ● Google ● Flickr ● Asana ● Travis ● Rally ● More and more
  • 10. What is Upwork.com • Formerly odesk.com • Upwork has nine million registered freelancers and four million registered clients. Three million jobs are posted annually, worth a total of $1 billion USD, making it the world's largest freelancer marketplace. • Highload. Microservice architecture
  • 11. Feature Flags. Our choise. ● Gradual rollout - Yes ● Graceful degradation - Yes ● Replace feature branches - Not yet
  • 12. Implementation. Prerequisites ● As simple as possible ● Platform agnostic
  • 13. Configuration file ● INI format ● Each feature has code name ● Naming convention ● GIT is used ● Each change should be reviewed ● Validation script ShowMickeyMouseOnHomePage.enabled = false
  • 14. Meta data ● Title ● Description ● Owner ● Responsible Team ● Reference Url ● Permanent
  • 15. Constraints ● Internal users ● Percent of users (1%, 5%, 30%, 50%, 100%) ○ Random within 0 - 100% but constant per user ● Percent of companies Create any constraints useful for for your project
  • 16. How do we update flags ● False for start ● Gradual update using Etsy Deployinator ○ Staging -> Production (including validation check) ● App servers update ● Placing configuration file to s3 storage
  • 17. How do we use it in PHP ● Take from S3 Cache to APC and create a backup local version. ● Service and Twig function if ($this->container->get('feature')->isEnabled('Feature')) { // do something ... } {% if feature_is_enabled('Feature') %} <p>Feature is enabled</p> {% endif %} ● For more information watch and read Benjamin Eberlei - presentation “Feature Flags with Symfony”
  • 18. Feature flags Audit ● Important to have visibility on changes ● Git history ● Write logs and send notification to chat/email/etc when you deploy
  • 19. Cleanup ● Cleanup as soon as feature is stable ● Keep number of conditions invasions small ● Create follow-up ticket to not forget to remove ● You can try to make cleanup fun :)
  • 20. Testing ● Feature Flags could complicate testing ● Unit tests ○ Just mock dependencies ● Integration/Functional tests We test combinations which should reasonably be expected to happen in production
  • 21. Feature Flags admin UI ● Important to have visibility on feature flags statuses ● Such UI should provide readable list of feature flags with possibility to search/ filter/sort etc ● We use it for enabling feature for current session
  • 22. FF lifecycle ● Add feature flag to config with disabled status ● Write code. Test your code in branch with enabled feature flag. ● Release code ● Enable feature for your own user. Check it ● Enable for internal users. Check it ● Gradual enabling for group of users. Monitoring ● Enable feature for 100% of users. Monitoring ● If everything is fine - cleanup feature flag if it is not permanent.
  • 23. Feature Flags and A/B testing ● A/B testing is a kind of randomized experiment with two variants, A and B. ● Feature flags approach is actually an A/B testing ● A/B testing system could be much more powerful ● We separated these systems
  • 25. Feature Flags problems ● Increase complexity and decrease the readability of code ● Accidental exposure ● Increases complexity of testing
  • 26. Feature Flags. Recommendations. Part 1 ● Keep FF implementation simple and modularized ● Use feature flags at minimum amount of points, avoid very invasive cases ● Avoid mixing feature flags ● Do monitoring ● Be careful with partial enabling many features at one time
  • 27. Feature Flags. Recommendations. Part 2 ● Reduce number of permanent feature flags ● Do cleanup as soon as possible ● Don’t leave code in the mainline just in case you might need it again some day. ● Changes involving data migrations must be handled with care ● Create clear guidelines, describing your approach, including section like “when to use toggles or not”
  • 28. Conclusions ● Feature flags are very handy to roll out new features gradually, but they also give you higher control over your system running in production as well. ● On top of that, they give you a means to disable certain features during a production incident. ● At the same time this approach brings new challenges. So decision is up to you, as always :)
  • 29. More cool reading General cool tech reading ● http://code.flickr.net/ ● https://codeascraft.com (Etsy, Rasmus Lerdorf) ● https://www.rallydev.com/blog/engineering ● https://blog.asana.com/eng/ Feature flags related reading ● http://code.flickr.net/2009/12/02/flipping-out/ ● http://martinfowler.com/bliki/FeatureToggle.html ● https://www.youtube.com/watch?v=KJKSCbYrNvY (Benjamin Eberlei - Feature Flags with Symfony) ● http://blog.travis-ci.com/2014-03-04-use-feature-flags-to-ship-changes-with-confidence/ ● https://blog.asana.com/2011/04/using-flags-to-ease-new-feature-development/ ● https://www.rallydev.com/blog/authors/ryan-scott?page=1 (4 articles) ● http://swreflections.blogspot.com/2014/08/feature-toggles-are-one-of-worst-kinds.html