Development (General)

What are feature flags and how do they work?

How feature flags let you ship code switched off, roll it out to 10% of users with sticky hashing, and turn it off again in seconds without redeploying.

  • 7 min read
  • 5 questions
  • +35 XP
Transcript

Feature flags, explained by cats. Kitty builds a new feature. Dark mode for her Tuna App. She wants to release it. but not for every cat. Not yet. So Kitty adds a feature flag. It’s like a light switch in her code.

off for most cats. Feature on for only some cats. Now she can ship the code safely. The feature is there but just hidden. No risky deployments. No broken tuna. Kitty can turn it on gradually. 10% of users first.

Then more. If something breaks, flip the switch off. Instant rollback. Back to the old tuna website. Feature flags let Kitty test, control, and release features without redeploying. Open source tools like Unleash help her manage them. That’s Feature Flags, tiny switches in your code that give Kitty full control over what goes live. Smart. Safe. And one flick away from tuna