Feature flags for web apps — what to use
Without feature flags, big features turn deploys into rituals with rollback drills. What to use for small and mid teams.
Feature flags are switches in code that toggle functionality without redeploy. Foundation tool for:
- Safer deploys (canary, gradual rollout).
- A/B testing.
- "Kill switch" for problematic features.
- Beta access for specific users.
Options:
- LaunchDarkly. Industry standard, mature. Expensive ($75+/seat/month for teams). Worth it for enterprises.
- GrowthBook. Open source, self-hostable. Free for most projects. Good A/B testing built in.
- PostHog flags. Bundled with PostHog analytics. Convenient if already on PostHog.
- Unleash. Open source, less polished, gets the job done.
- Custom. A flag table in your DB plus an admin UI. Built in a day. No A/B infrastructure out of the box.
Common mistakes:
- Flags that never get removed. Years later, dozens of dead toggles nobody remembers the purpose of.
- Flags read on every request without caching — slow.
- Flags by user_id not segment — can't roll out to "10% of users".
- No clear flag ownership — who decides when to remove the flag.