
Part 2: Kill Switches and Scheduled Flags — Feature Flags in Production (Java)
Part 2 of Feature Flags from Scratch . Part 1 built a feature flag system with rollout percentages and targeting rules on top of PostgreSQL. This post adds two production-critical capabilities: a kill switch that force-disables a flag instantly regardless of its current state, and scheduled activation so flags turn on and off automatically at a specified time. It's Tuesday afternoon. A flag you shipped last week — currently at 40% rollout — is causing errors for users in that cohort. Your monitoring fires. You need to turn it off. The system from Part 1 can do this: set enabled: false . But there's a problem. You have to know the current state, write the right payload, and wait for the normal update path. In a real incident, that's friction you don't want. What you actually need is a big red button: force-disable this flag, right now, regardless of what state it's in. One field. Evaluated before everything else. Overrides all rules and rollout percentages. And the other gap: you can't
Continue reading on Dev.to Tutorial
Opens in a new tab

