Prompt
Need kill switch for risky production feature
Latest observation
Oct 13, 2026
OpenAI APIWeb search: off
A good kill switch for a risky production feature should be:
- Fast to toggle
- Safe by default
- Independent of deploys
- Visible in monitoring
- Reversible without code changes
Recommended approach
Use a remote config / feature flag with a server-side check:
feature_enabled = true/false- default to off if config is unavailable
- evaluate at request time or on short cache TTL
- make it possible for on-call to disable instantly
Implementation pattern
- Put the feature behind a flag in a central system:
- LaunchDarkly, Unleash, ConfigCat, Firebase Remote Config, or your own config service
- Add a hard stop path in code:
- if flag is off, skip the risky code entirely
- Add circuit-breaker logic if failures spike:
- disable automatically when error rate / latency crosses a threshold
- Use gradual rollout:
- 1% → 10% → 50% → 100%
- Log/metric whenever the feature is active so you can verify impact
Safety checklist
- Kill switch must be available to ops/on-call, not just developers
- Change should propagate in seconds or less
- If config service is down, feature should fail closed
- Add alerting on:
- feature error rate
- fallback path usage
- config fetch failures
- Document the exact steps to disable it during an incident
Simple design
- Request comes in
- Service checks
risk_feature_enabled - If
false, use old path - If
true, use new path - If errors spike, on-call flips flag to
false
Example pseudo-code
if not flags.is_enabled("risky_production_feature"):
return old_behavior()
return new_behavior()
If you want, I can give you:
- a concrete design for your stack,
- a database-backed kill switch, or
- a code example in your language/framework.