The Art of Feature Flagging

Rate this content
Bookmark

Fed up with merge conflicts and system failures after a big release? Feature flags can be your lifesaver!


We strive to get new features to the hands of our users as fast as we sustainably can. Some features can take longer to develop and touch other parts of the system. If not handled with care, these kinds of features can result in merge conflicts that keep developers up all night, not to mention the dreaded system failures following a big release. Equipped with feature flags, we can avoid this nightmare and continuously deploy code changes safely.


This talk consists of practical tips on how to use feature flags as release toggles.

Dianing Yudono
Dianing Yudono
8 min
01 Jul, 2021

Comments

Sign in or register to post your comment.

Video Summary and Transcription

Feature flagging is an effective practice in software development to prevent unexpected impacts of code changes. Virtuflex offers a solution for continuous integration and deployment, allowing developers to serve random comics with different randomizer options. Feature flags are used to control the behavior of AI systems during development, enabling gradual deployment and automated testing. Once a feature is complete and tested, the code and flag can be safely removed.

1. Introduction to Feature Flagging

Short description:

Hi, my name is Diani Yedono, and I've been developing software for over a decade. I would like to share one effective practice called feature flagging that I've been using to keep integrating and deploying my code. Sometimes changes to a code wouldn't affect any other part of the software system. However, even a little change can unexpectedly affect other parts. There are many processes that people use to ensure the software is protected from migrations introduced by any code change. One of the processes is to have long-lived feature branches.

Hi, my name is Diani Yedono, and I've been developing software for over a decade. I would like to share one effective practice called feature flagging that I've been using to keep integrating and deploying my code.

Let's start with thinking back in time. Can you remember that time when a system failure happened right after a big release? If you've never experienced that, I wish you don't ever have to because it's just awful. This comment shows a person asking another person to imagine they deployed a new version of their customer management system and 15 minutes later the online shop crashes.

Sometimes changes to a code wouldn't affect any other part of the software system. However, in many cases, even a little change can unexpectedly affect other parts. And that's quite normal. There are many processes that people use to ensure the software is protected from migrations introduced by any code change. One of the processes is to have long-lived feature branches. Each of the branches is extensively reviewed and tested before being merged. However, this can lead to another type of problem. This comment shows a developer who's trying to merge their branch into main. First, they pull the changes from main into their branch. Once they're happy, they're getting ready to merge their branch back into main. However, another developer has just merged a big chunk of change into main. Merging big changes can lead to merge conflict and that can keep developers up at night. And it's not a sustainable practice.

2. Introduction to Virtuflex

Short description:

Continuous integration is a popular practice in software development, but merging half-baked code can be challenging. Thankfully, Virtuflex offers a solution. This talk focuses on using Virtuflex for continuous integration and deployment. Let's explore an example web application that utilizes Virtuflex to serve random comics to users, with the ability to switch between a math randomizer and an AI-based randomizer.

These pains have led people to start practicing continuous integration, where developers continuously integrate their code changes into main, little by little and regularly. But what if the new feature takes rather long to develop? How can we merge half-baked code without affecting the users or consumers of the software?

Thankfully, Virtuflex can help us. Virtuflex has been used for many purposes, some of which are not part of this talk. So this talk is not about using Virtuflex for canary release, A-B testing, or Kailh switch. But this talk is about using Virtuflex for continuous integration, which is to continuously merge code changes into main or trunk, and continuous deployment, which is to continuously deploy code changes to production safely.

Now let's take a look at an example web application that is going to use Virtuflex. This is a web app that stores a collection of digital comics. It has one feature, which is to serve a random comic to the user. Initially, the website uses a math randomizer. Then it is decided to have a new feature and use an AI to serve a random comic to users. And this AI can serve the random comic depending on the weather, for example, or depending on what's trending in the world. I'm just making up some new features here. The randomizer needs to be changed to use AI. And it can take a while to do that.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Levelling up Monorepos with npm Workspaces
DevOps.js Conf 2022DevOps.js Conf 2022
33 min
Levelling up Monorepos with npm Workspaces
Top Content
Learn more about how to leverage the default features of npm workspaces to help you manage your monorepo project while also checking out some of the new npm cli features.
Automating All the Code & Testing Things with GitHub Actions
React Advanced Conference 2021React Advanced Conference 2021
19 min
Automating All the Code & Testing Things with GitHub Actions
Top Content
Code tasks like linting and testing are critical pieces of a developer’s workflow that help keep us sane like preventing syntax or style issues and hardening our core business logic. We’ll talk about how we can use GitHub Actions to automate these tasks and help keep our projects running smoothly.
Fine-tuning DevOps for People over Perfection
DevOps.js Conf 2022DevOps.js Conf 2022
33 min
Fine-tuning DevOps for People over Perfection
Top Content
Demand for DevOps has increased in recent years as more organizations adopt cloud native technologies. Complexity has also increased and a "zero to hero" mentality leaves many people chasing perfection and FOMO. This session focusses instead on why maybe we shouldn't adopt a technology practice and how sometimes teams can achieve the same results prioritizing people over ops automation & controls. Let's look at amounts of and fine-tuning everything as code, pull requests, DevSecOps, Monitoring and more to prioritize developer well-being over optimization perfection. It can be a valid decision to deploy less and sleep better. And finally we'll examine how manual practice and discipline can be the key to superb products and experiences.
Why is CI so Damn Slow?
DevOps.js Conf 2022DevOps.js Conf 2022
27 min
Why is CI so Damn Slow?
We've all asked ourselves this while waiting an eternity for our CI job to finish. Slow CI not only wrecks developer productivity breaking our focus, it costs money in cloud computing fees, and wastes enormous amounts of electricity. Let’s take a dive into why this is the case and how we can solve it with better, faster tools.
The Zen of Yarn
DevOps.js Conf 2022DevOps.js Conf 2022
31 min
The Zen of Yarn
In the past years Yarn took a spot as one of the most common tools used to develop JavaScript projects, in no small part thanks to an opinionated set of guiding principles. But what are they? How do they apply to Yarn in practice? And just as important: how do they benefit you and your projects?
In this talk we won't dive into benchmarks or feature sets: instead, you'll learn how we approach Yarn’s development, how we explore new paths, how we keep our codebase healthy, and generally why we think Yarn will remain firmly set in our ecosystem for the years to come.
Atomic Deployment for JS Hipsters
DevOps.js Conf 2024DevOps.js Conf 2024
25 min
Atomic Deployment for JS Hipsters
Deploying an app is all but an easy process. You will encounter a lot of glitches and pain points to solve to have it working properly. The worst is: that now that you can deploy your app in production, how can't you also deploy all branches in the project to get access to live previews? And be able to do a fast-revert on-demand?Fortunately, the classic DevOps toolkit has all you need to achieve it without compromising your mental health. By expertly mixing Git, Unix tools, and API calls, and orchestrating all of them with JavaScript, you'll master the secret of safe atomic deployments.No more need to rely on commercial services: become the perfect tool master and netlifize your app right at home!

Workshops on related topic

Deploying React Native Apps in the Cloud
React Summit 2023React Summit 2023
88 min
Deploying React Native Apps in the Cloud
WorkshopFree
Cecelia Martinez
Cecelia Martinez
Deploying React Native apps manually on a local machine can be complex. The differences between Android and iOS require developers to use specific tools and processes for each platform, including hardware requirements for iOS. Manual deployments also make it difficult to manage signing credentials, environment configurations, track releases, and to collaborate as a team.
Appflow is the cloud mobile DevOps platform built by Ionic. Using a service like Appflow to build React Native apps not only provides access to powerful computing resources, it can simplify the deployment process by providing a centralized environment for managing and distributing your app to multiple platforms. This can save time and resources, enable collaboration, as well as improve the overall reliability and scalability of an app.
In this workshop, you’ll deploy a React Native application for delivery to Android and iOS test devices using Appflow. You’ll also learn the steps for publishing to Google Play and Apple App Stores. No previous experience with deploying native applications is required, and you’ll come away with a deeper understanding of the mobile deployment process and best practices for how to use a cloud mobile DevOps platform to ship quickly at scale.
MERN Stack Application Deployment in Kubernetes
DevOps.js Conf 2022DevOps.js Conf 2022
152 min
MERN Stack Application Deployment in Kubernetes
Workshop
Joel Lord
Joel Lord
Deploying and managing JavaScript applications in Kubernetes can get tricky. Especially when a database also has to be part of the deployment. MongoDB Atlas has made developers' lives much easier, however, how do you take a SaaS product and integrate it with your existing Kubernetes cluster? This is where the MongoDB Atlas Operator comes into play. In this workshop, the attendees will learn about how to create a MERN (MongoDB, Express, React, Node.js) application locally, and how to deploy everything into a Kubernetes cluster with the Atlas Operator.
Azure Static Web Apps (SWA) with Azure DevOps
DevOps.js Conf 2022DevOps.js Conf 2022
13 min
Azure Static Web Apps (SWA) with Azure DevOps
WorkshopFree
Juarez Barbosa Junior
Juarez Barbosa Junior
Azure Static Web Apps were launched earlier in 2021, and out of the box, they could integrate your existing repository and deploy your Static Web App from Azure DevOps. This workshop demonstrates how to publish an Azure Static Web App with Azure DevOps.
How to develop, build, and deploy Node.js microservices with Pulumi and Azure DevOps
DevOps.js Conf 2022DevOps.js Conf 2022
163 min
How to develop, build, and deploy Node.js microservices with Pulumi and Azure DevOps
Workshop
Alex Korzhikov
Andrew Reddikh
2 authors
The workshop gives a practical perspective of key principles needed to develop, build, and maintain a set of microservices in the Node.js stack. It covers specifics of creating isolated TypeScript services using the monorepo approach with lerna and yarn workspaces. The workshop includes an overview and a live exercise to create cloud environment with Pulumi framework and Azure services. The sessions fits the best developers who want to learn and practice build and deploy techniques using Azure stack and Pulumi for Node.js.