Home / Developers / Kill Switch and Incident Rollback

Guides and playbooks

Kill Switch and Incident Rollback

Use a boolean flag as the fastest path from incident detection to mitigation, without waiting for a redeploy.

Recommended pattern

Create a dedicated boolean flag for any feature that could need immediate rollback. In code, keep the old path or degraded path available behind the false branch. That keeps rollback to a target change instead of a deployment.

Boolean kill switch pattern typescript

const processorEnabled = await zenmanage.flags().single('new-payment-processor', false);

if (processorEnabled.isEnabled()) {
  return processWithNewProcessor(payment);
}

return processWithLegacyProcessor(payment);
  

Rollback steps

  1. 1. Identify the flag or target that controls the failing behavior.
  2. 2. Set the published target to the safe value, usually false for a kill switch.
  3. 3. Confirm the application path serves the fallback branch or previous implementation.
  4. 4. If your app caches values, ensure the webhook consumer or refresh path invalidates stale state quickly.
  5. 5. Record the change in incident notes so later analytics review has the correct timeline.

Propagation expectation

Zenmanage documentation does not publish a single universal propagation SLA for every runtime and cache strategy. Your effective rollback speed depends on how often clients refresh and whether you invalidate caches with webhooks.

During the incident

Keep the flag change itself small. Do not rewrite rollout rules under pressure if a simple target flip will stop the blast radius. If the issue is audience-specific, narrow the rollout by context or segment only after the immediate mitigation is in place.

After the incident, use the debugging and observability guide and the analytics guide to verify who saw the changed behavior and whether stale defaults or rollout logic contributed.

Next step

Take the next integration step in your own stack.

Start with the quickstart that matches your runtime, then return to the reference pages when you need exact request and payload details.