Skip to content

Progressive rollout ​

Overview ​

A progressive rollout refers to a gradual release of a new feature to a subset of users. Instead of making the feature available to everyone at once, it's rolled out incrementally automatically, often starting with a small percentage and gradually increasing it over time.

Define a progressive rollout ​

In Semaphore, you can define a progressive rollout by setting the condition of the release ramp for the progressive rollout.

The condition to switch from one variation to another are based on dates and will roll out from 0% to 100% within the specified time frame.

To achieve this you will start by configuring the initial state of the flag and the end state of the flag.

  • Before the initial date, the flag will return the initial variation
  • Between the initial and end date, the flag will gradually shift from one variation to the other.
  • After the end date, the flag will return the end state variation.

Format ​

NOTE

The dates are in the format supported natively by your flag file format.

FieldDescription
initialThe initial state of this flag.
variation is the variation you intend to switch from.
date is the date to start the rollout.
endThe end state of this flag.
variation is the variation you intend to switch to.
date is the date when rollout is completed.
percentage
(optional)
It represents the ramp of progress, at which level the flag starts (initial) and ends (end).
Default: initial = 0 and end = 100.

Example ​

Between the 2024-01-01T05:00:00.100Z and 2024-01-05T05:00:00.100Z, the flag will gradually shift from variationA to variationB.

yaml
progressive-flag:
  variations:
    variationA: A
    variationB: B
  defaultRule:
    progressiveRollout:
      initial:
        variation: variationA
        date: 2024-01-01T05:00:00.100Z
      end:
        variation: variationB
        date: 2024-01-05T05:00:00.100Z

Advanced: Using the percentage field ​

If you intend to partially rollout or keep both features, you can use the percentage field to define the ramp of progress.

yaml
    progressiveRollout:
      initial:
        variation: variationA
        percentage: 20   
        date: 2024-01-01T05:00:00.100Z
      end:
        variation: variationB
        percentage: 80
        date: 2024-01-05T05:00:00.100Z
  • Before the initial date, the flag will return variationA for all users.
  • At the initial date, the configured split starts at 20% variationB and 80% variationA.
  • Between the initial and end dates, the share of users receiving variationB gradually increases from 20% to 80%.
  • At and after the end date, the configured split remains at 80% variationB and 20% variationA.

Released under the MIT License.