انتقل إلى المحتوى
#0086
Sqlite

Feature flags that turn themselves off

You're shipping a risky feature behind a flag for a 24-hour soak. You PUT kv/flag:new-checkout with ?ttl=86400. Twenty-four hours later, the key is gone. The check in your code goes back to default-off automatically.

If the soak goes well, you re-PUT with no TTL: the flag is now permanent. If it goes badly, you DELETE early. If you forget about it entirely, the TTL handles it for you.

You used to run LaunchDarkly for this and pay $200 a month per seat. Or you used to have a feature_flags table and a half-working admin UI nobody trusted. Now you have a key with an expiry, and the expiry is the whole feature.

Most flags don't need percentage rollouts and audience targeting. Most flags need on for a while, then off: and PUT-with-TTL is exactly that.

Every feature flag carries its own off-switch.