Best Practice #1: Maintaining Consistency of Feature Flags During Rollout
This guide explains how to keep a feature flag's assignment consistent for individual users as exposure percentages increase or decrease, using a new "Previously Seen Products" section on an e‑commerce search page as a practical example.
We assume an e‑commerce company has a main search page where customers can look for products, but many users only search repeatedly without making purchases, and only a small fraction eventually place an order.
The product owner proposes a new area titled "Previously Seen Products" to display items a user has previously searched for, aiming to reduce search time. This area is controlled by a feature flag named new_search_relevance and will initially be enabled for 10% of users.
The expectation is that once a user (e.g., User A) is assigned to the "on" variant of the flag, they should continue to see the same variant regardless of how many times the flag is evaluated, provided no external changes (such as a flag definition change) occur.
Consequently, when the feature’s exposure is increased to 40%, 60%, 80%, etc., a user who previously experienced the feature must still see it, and the existing allocation should remain intact.
If the exposure is reduced—for example, from 10% to 5%—the system must have a "memory" capability to remember the user’s prior assignment; otherwise, it is nearly impossible to keep User A in the "on" group because the system cannot predict whether the user will be placed in the "on" or "off" group after the reduction.
Continuous Delivery 2.0
Tech and case studies on organizational management, team management, and engineering efficiency
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.