Rollout and rollback features
A feature rollout enables you to safely deliver a new feature to your users by controlling who sees it, and when. Using toggle controls, you can deploy a feature to a percentage of your traffic, or roll the feature back if needed. Optimizely also enables you to use attributes to target your rollout to a certain audience, so that only a subset of users (for example, users in the United States) gets access to the feature. Rollouts and rollbacks take effect immediately without a new code deploy.
Advantages of using rollouts
Rollouts help you mitigate risk. Rollouts for new features default to OFF with 0% of traffic allocated. You can adjust the rollout as needed as you iterate on and refine your feature. For example, if you want to be sure that a new feature doesn’t degrade the visitor experience, start by launching the feature to a small percentage of visitors.
Rollouts also let you launch winning variations that you identify through experimentation. For example, if you find a winning variation when running a feature test, use a feature rollout to gradually expose the winning variation to your visitors in a controlled fashion.
Bucketing logic and traffic percentages in feature rollouts
Feature rollouts use bucketing logic to evaluate traffic allocation. The logic combines the user ID and a unique rollout ID to compute a deterministic hash that outputs a number between 0 and 10,000. If that number falls within the range specified by the feature rollout’s traffic allocation, the visitor is eligible for the feature.
If you toggle a feature rollout on for a percentage of traffic, then toggle it off, then toggle it back on, the rollout will retain the previously defined traffic percentage. This ensures that you can turn the same features back on for the same percentage of visitors. For example, imagine you roll out a feature to 1% of your site traffic, then learn that the feature is broken. You can turn off the feature, deploy a fix, then turn the feature back on. The same 1% of traffic who saw the broken feature will see the fixed feature.
See also Interactions between rollouts and feature tests and our support documentation article Traffic allocation and distribution.
Rollout a feature
After defining or changing a rollout, you must click Save to confirm your changes. If you enable a rollout for a non-zero traffic percentage, clicking Save launches the rollout.
To roll out a feature:
- Click Features in the left navigation and select a feature. The Edit Feature page appears.
- Under Rollout, select an environment from the dropdown.
- Toggle Feature to On, and adjust the traffic allocation.
- Click Save.
Target rollouts by audience
Target feature rollouts using your defined audiences. You can target more than one audience for a feature rollout. Multiple audiences are combined with the Boolean operator OR.
To target one or more audiences for a rollout:
- Navigate to Features and click the feature you want to target by audience.
- In the Audiences section, click the names of the audiences you want to add.
- Click Save.
Determine if a rollout is enabled
To determine whether a feature is enabled for a given user, use the Is Feature Enabled method with the feature's key and a user ID. The value this method returns is determined by any tests running on the feature and the rollout. For example, if the feature's rollout setting is on for 50% of users, the method returns
true for half of the user IDs and
false for the others.
Rollouts are used for launching features, so no impressions are sent and no extra network traffic is generated. To measure the impact of a feature and track metrics on your Results page, create a feature test instead of a rollout.
Feature rollouts and feature tests operate on the same feature flags, but they have important differences. Before using a rollout or a test, be sure to read the topic Interaction between feature rollouts and feature tests.
Manage feature rollouts
The Features dashboard gives you a snapshot of what is happening to a feature at a given point in time:
- Active Experiments: lists all active (running or paused) feature tests for each feature.
- Environment: lists the available production and staging environments.
- Rollout: shows the traffic allocation if a rollout is currently running for the feature (or OFF, if the feature is toggled off).
- Created: date the feature was created
- Modified: date the feature or rollout was last modified
Once you've removed a feature flag from your code, you can archive it by clicking the Action icon (…) and selecting Archive.
Updated about 1 year ago