The world of software development is constantly evolving, and with it come new ways to roll out software to users. One method that has been gaining popularity in recent years is Progressive Delivery. But what is progressive delivery, and how does it work? In this post, I will explore the core tenets of progressive delivery and see how software companies have implemented it. Finally, I’ll share some insights on how it is improving the way software is being delivered in other industries, like the Automotive industry, and why that is a thing.
Progressive Delivery: What is it and how does it work?
Progressive delivery is a software development technique that allows teams to release new features to users gradually, rather than all at once. In addition to helping developers validate the new features, this strategy also helps reduce the risk of running buggy software after a release.
The origins of progressive delivery can be traced back to the early days of software development when teams would deliver new features and updates, including bug fixes and new application versions directly to the entire user base. Unfortunately, this approach frequently led to later problems, as teams were unable to validate the new features before making them available to the larger user groups. Remember buggy applications on physical disks? Those were the days...
In the early 2000s, the concept of feature flags began to gain popularity as a way to control the release of new features. In progressive delivery, feature flags are used to selectively enable or disable certain features of a software application without the need for a full release.
Over time, the concept of progressive delivery has evolved to include other techniques such as canary releases, A/B testing, and blue-green deployments. These techniques, when used in conjunction with feature flags, allow developers to validate new features through flexible and controlled experimentation, testing, and rollback of the changes without affecting the entire user base. It is considered one of the most effective ways of releasing new features and updates with minimal risk and maximum feedback.
The Core Tenets of Progressive Delivery
At its core, progressive delivery is a way to manage the risk of releasing new software by reducing the blast radius of any issues that may arise. The following are some of the key tenets of progressive delivery:
Feature Flags, also known as feature toggles, can enable or disable functionality in a running system by changing the behavior of the code, without deploying new software versions.
Feature flags are typically implemented using a combination of code and a management system. The code is used to check the status of the flag and determine whether a feature should be enabled or disabled. The management system allows teams to control the status of the flags and toggle them on or off as needed. This can be done by using a dedicated feature flag and configuration management service, like ConfigCat.
Canary Testing is used to test new features or changes in a live production environment before releasing them to a wider audience.
The term "canary testing" comes from the practice of coal miners who used to bring canaries into the mines to detect toxic gasses. If the canaries died, the miners knew that the gasses were present and that they needed to evacuate the mine.
In a similar but less dramatic way, a small subset of users, usually a percentage of the total user base, is selected to receive the new feature. This group of users is known as the "canary group". The new feature is then tested and monitored in the canary group, while the rest of the users continue to use the previous version of the application. If the new feature or change works as expected and no major issues are detected, it can be gradually rolled out to the rest of the users. If any bugs are found, the change can be quickly rolled back, and the team can work on resolving them before trying again.
A/B Testing, also known as split testing or bucket testing, is a way to compare two different versions of a feature. Through A/B testing, you can determine which variation performs better and decide which features to implement based on the data.
For example, if a team is developing a new feature for an e-commerce website, they might use A/B testing to determine which version of the feature results in more sales. They would randomly divide users into two groups and expose one group to version A of the feature and the other group to version B. The teams then measure and compare the performance of the two variations, using metrics such as conversion rates, engagement, or general satisfaction. Once the testing is completed, the variation that performs better is deployed to the entire user base.
Blue-Green Deployments are a way to introduce new features by using two identical production environments, "blue" and "green". The blue environment is the current one and the green environment receives the new feature.
When the new version of the application is ready to be tested, it is deployed in the green environment. Once it is determined to be stable, traffic is redirected to it, making the new release available to users. The blue environment is then used for the next release, while the green one continues to serve the current version.
Observability is an essential aspect of progressive delivery, as it allows teams to monitor and understand the behavior of their systems in real-time. This is typically achieved through a combination of logging, monitoring, and tracing:
Logging captures detailed information about the system's behavior, including events, errors, and performance metrics.
Monitoring allows teams to track the system's overall health and performance in real-time, and to set up alerts for potential issues.
Tracing provides a detailed view of how a specific request or transaction flows through the system, allowing teams to identify bottlenecks and troubleshoot issues.
Observability also allows teams to measure the impact of new features on the user experience, and to gather feedback from real users to improve the features. Additionally, observability can also be used to monitor the performance of the feature flags and canary releases, to ensure they are working as expected.
Rollbacks refer to the ability to quickly undo or reverse changes that have been made to a system. This can include rolling back a code change, a configuration change, or the deployment of a new feature:
Reverting code changes: this can be done by using version control tools such as Git to revert code changes that were made in the current release.
Deploying a previous version of the application: either from source control or from a pre-built package.
Feature flags can be used to quickly disable new features or changes that are causing issues, without having to roll back the release.
Canary releases: if a new feature or change is causing issues, it can be quickly rolled back by disabling it for the canary group, and then rolling back the change for the entire user base.
Having a rollback plan in place is essential for the delivery pipeline. A good rollback plan should be tested, easy to execute and well-documented, so that all team members know how to do it, and can do it quickly and confidently.
Progressive Delivery in Action: Real-World Examples
Progressive delivery is a popular way for companies to roll out new features to their users. The following are a few examples of how it is being used in the real world:
Streaming services like Spotify and Netflix use feature flags and canary testing to control the release of new features. For example, Spotify uses feature flags to release a new music recommendation algorithm to a selected group of users before rolling it out to everyone, and Netflix uses feature flags to release a new navigation menu to a small group of users first.
Digital bank, Revolut, uses "beta testing" feature flags to roll out new features by selecting a small percentage of its user base to participate in the beta testing program. They then gather feedback and measure the performance of the new features before releasing them. An example of a feature they've released using this method is a new "budgeting" feature that allows users to set budgets, track expenses, and set savings goals within the app.
Even the automotive industry is getting in on the action. BMW has implemented progressive delivery in its software development for over-the-air updates on its new electric vehicles using "shadow mode" feature flags. The vehicles in "shadow mode" receive the new software updates, but the new features are not enabled until BMW has validated and ensured the smooth release of the update.
Conclusion
Throughout this article, I discussed the principles of progressive delivery and its core concepts and explored how businesses across various industries have adopted them. Using progressive delivery techniques, developers can test changes in a production-like environment, experiment with new features, and make data-driven decisions, while providing a safety net in case any issues arise. Progressive delivery is a set of powerful tools that can help organizations become more agile and responsive to the needs of their users.
Do you want to learn more about feature flags and other tools used in a modern software delivery pipeline? Follow ConfigCat on social media to keep up to date with the latest tech trends: X, Facebook, LinkedIn, and GitHub.