First Feature Flag
LaunchDarkly hello world.
Overview
The first feature flag moves release from binary all-or-nothing to gradual progressive delivery. LaunchDarkly, GrowthBook, Unleash all support the same patterns: per-user targeting, percentage rollout, kill switches, and cleanup discipline once the feature is GA. The discipline matters more than the tool choice; the patterns are the same regardless.
- First flag in the application. Hello-world flag wired through the SDK. Establishes the integration pattern.
- Per-user targeting. Selected users (employees, beta cohort) get the new behaviour first. Validation arrives before broad rollout.
- Percentage rollout. 5 percent, then 25, then 100. Bad releases get caught at the small number.
- Kill switch plus cleanup discipline. Disable a feature without redeploy; remove old flags within 30 days of GA so the codebase does not accumulate dead conditionals.
The approach
Three habits make feature flags produce low-risk releases: gradual rollout with metric gates, kill switch on every flag, and cleanup discipline once features reach GA.
- Per-user targeting first. Internal users hit the new code first. Bugs surface before customer impact.
- Percentage rollout with gates. 5 percent, then 25, then 100. Each step gated on error-rate and latency metrics.
- Kill switch on every flag. Disable without redeploy when something goes wrong. Incident response stays fast.
- Cleanup on GA plus documented lifecycle. Flags removed within 30 days of GA; per-flag the rationale and lifecycle documented.
Why this compounds
Each gradual rollout deposits release safety. Bad releases get caught at 5 percent rather than 100; kill switches turn incidents into minute-scale events instead of hour-scale ones; cleanup discipline keeps the codebase free of dead conditionals.
- Release safety improves. Bad releases caught at 5 percent, not 100. Customer impact shrinks dramatically.
- Operational fit. Kill switch supports incident response. Disabling broken features takes seconds.
- Experimentation enabled. A/B testing rides the same infrastructure. Product decisions get data-driven.
- Year-one investment, year-two habit. First flag is investment. By the tenth, flags are part of every feature release.