Skip to main content

Feature Flagging & Rollout

Feature flagging and rollout enable gradual exposure of changes, segment rollouts, and quick rollback to safely deploy new features and changes.

Overview​

Feature flags allow you to control feature visibility, enabling gradual rollouts, segment-specific deployments, and instant rollbacks without code changes.

Gradual Rollout​

Roll out features gradually:

{
"rollout_strategy": "gradual",
"stages": [
{
"percentage": 1,
"duration_hours": 24
},
{
"percentage": 5,
"duration_hours": 48
},
{
"percentage": 25,
"duration_hours": 72
},
{
"percentage": 100,
"duration_hours": null
}
]
}

Segment Rollouts​

Roll out to specific segments:

{
"rollout_strategy": "segment",
"segments": [
{
"segment": "internal_users",
"percentage": 100
},
{
"segment": "beta_users",
"percentage": 50
},
{
"segment": "general_users",
"percentage": 0
}
]
}

Quick Rollback​

Enable instant rollback:

{
"rollback": {
"enabled": true,
"trigger_conditions": [
{
"metric": "error_rate",
"threshold": 0.05,
"action": "auto_rollback"
}
]
}
}

Best Practices​

  1. Start small: Begin with small percentages
  2. Monitor closely: Watch metrics during rollout
  3. Have rollback plan: Be ready to roll back quickly
  4. Test in segments: Use internal/beta segments first
  5. Document flags: Keep track of active feature flags