Feature flags. In modern development they’re an incredibly common building block we interact with every day. Yet they often don’t achieve their full potential by driving the kind of rapid testing and experimentation that will make your team and organization truly world-class (or truly resilient to the growing uncertainties of our world).
The bottom line is that every API, web app, SaaS platform… essentially every tech company, should be using a robust feature flag system. A well-built and well-implemented system will provide a host of value-adds and efficiencies for your dev team.
1. Feature Flags Enable Controlled Rollouts
A controlled rollout is “a feature rollout with highly granular user targeting. It allows you to release new features gradually, ensuring a good user experience for smaller groups of users before releasing them to larger groups.”
Controlled rollouts typically fall into two types, and both are best implemented via feature flags. In the first type the feature is released to a percentage of users (this can even be your internal or beta testers), and in the second the users are selected based on a specified attribute, like location, or IP address. Without a feature flag system in place, you’re likely going to be building this rollout mechanism yourself, and it will have limited reusability. A robust feature flag system will inherently enable either type of controlled rollout.
Beyond making targeting easier, feature flags make rollback a snap. There’s no code to re-deploy, you simply toggle your new feature off to the test group and relax in the knowledge that the majority of your user base were unaffected.
2. Feature Flags Centralize Visibility and Control
If all new features and updates deploy under the same feature flag system across your entire organization, you immediately ensure a level of safety and resilience in your app or API. If a rollback is needed it can be toggled by anyone with the appropriate permissions, vs. only those familiar with the specific code being deployed.
By using a master dashboard like the one in Split’s Feature Delivery Platform, you can control and monitor feature flag activity across multiple software products, and enable your Product Management team to take much of the release burden off of DevOps.
3. Feature Flags Enable Testing in Production
Let’s get real for a second. Everyone hates staging. Staging environments never exactly match production AND they’re costly to maintain. Truly, the only way to know that your features are working in production is to test them in production.
Since feature flags allow for continuous deployment of code directly into production, you can perform usability testing in production as well. Just enable your new features for devs and testers initially. Then verify the new code in production before a single customer is impacted by your changes.
4. Feature Flags Give You a Kill Switch
If you’re going to test in production, how do you do so safely? Simple, you need an easy to use kill switch for every feature flag, so that anyone on your team can immediately disable any flag if a problem is detected. (And hey, with feature flags it’ll also be easy to redeploy that feature you killed when it bugged out!)
A kill switch isn’t the same as a rollback either, if that’s what you’re thinking. It’s an off switch. When you do decide to turn it back on post-fix, you won’t have to go through a code review process or even revert the change that caused the issue. You, your teammate, or your PM can just flip the switch. (With a feature flag management platform this would also mean that those same PMs can kill a feature easily, without needing to stop the line and pull in a developer.)
5. Feature Flags Separate Code Deployment from Rollout
You’re a savvy developer. You’re ready to deploy your new feature to prod weeks before your PM is ready to begin testing and optimization. Deploy your code behind a feature flag and move along with your sprint, the PM can have you toggle it on when they catch up (or, like I keep mentioning, if you have a management platform they can self-serve this function).
Bottom line? Feature flags allow you to deploy new features to production and choose when to enable them.
6. Feature Flags Enable Localization and Internationalization
This goes to one of the core functions of feature flags, user segmentation. Segmentation allows you to test in production with a canary, it enables randomized groups for experimentation, and it allows you to group your users by attributes. If localization and internationalism matter for your app or API, you can easily build that into your feature flag structure and only enable features in the appropriate regions, serve up language variations for your platform, or solve really any other demographic-specific need.
7. Feature Flags Simplify Migrations
Don’t push code changes at the same moment you’re ready to switch over to a new database or backend service: write the code, deploy and test it in production ahead of time, and use feature flags to cut over customer traffic the moment you’re ready. The benefits here are huge. Infrastructure changes are particularly fraught, and concerns can be mitigated slowly and responsibly with feature flags. Cut over one customer or region at a time to ensure the rest of your infrastructure can manage the load.
Bonus – Feature Flags Enable Automation and Experimentation
I’ve mentioned it before, but let’s recap… Feature flags, and especially a robust feature flagging platform, allow your application to automatically toggle features in response to changes in system performance or other predefined triggers without any human involvement. For example, when peak load occurs, you might turn off a recommendation engine or an inventory check before allowing an item to be put in the cart.
Feature flags also enable experimentation. While this isn’t purely a software development concern, I promise your PM cares about testing their features. With feature flags you can configure statistically rigorous tests that will drive real business impact, all based on how your customers are already using your features, and how they interact with new features you toggle on.
Learn More About Adding Feature Flags to Your Application
Here at Split we obviously think feature flags are the bomb, and that they’ll solve all your development woes. They might even be able to put to rest the age-old argument of tabs vs. space. We don’t know how, but we believe.
Anyway, if you’re interested in implementing feature flags in your application (and sharing the joy of flags with us) we’ve got some content just for you!
- How to Branch by Abstraction with Feature Flags
- Database Migrations with Feature Flags
- Set Up Feature Flags with React in 10 Minutes
- Build a Web App with Spring Boot and Feature Flags in 15 Minutes
- 5 Best Practices for Testing in Production with Feature Flags
And as always, we’d love to have you join us on your social media platform of choice. We share all our latest content, features, and integrations on Twitter, LinkedIn, and Facebook, and we release new videos regularly on YouTube.
Stay up to date
Don’t miss out! Subscribe to our digest to get the latest about feature flags, continuous delivery, experimentation, and more.
In this tutorial you’re going to create a CoffeeBot app. The app will have a Vue.js client and a Spring Boot resource server, bootstrapped using JHipster.
Audit logs are a feature that every enterprise customer wants in all of their products. Customers need to know who changed which settings and at what time. They need to know when someone creates a user account in their company’s instance of the product, who accessed what data, and more.…