IOSOR Learn
Verifying Standby Rail Preemption and Drain Before Failover
How to test standby rail preemption and graceful drain before failover fires: orphaned message checks, duplicate-send guards, DLR receipt parity, and partner route shortlisting.
Lead Telecom & Routing Architect · Lausanne, CH
Prove preemption and drain on the standby rail before failover fires: confirm in-flight work is cancelled or handed off cleanly, no messages orphan, and no duplicate sends slip through. Then compare partner routes in the Decision Brief for proven semantics.
Define preemption versus drain semantics
Split the standby rail lifecycle into two states. Preemption is the standby cancelling or seizing in-flight submissions the moment primary health fails. Drain is the orderly finish of accepted-but-unconfirmed work so no message is silently dropped. Write both as explicit contract terms: a submission is either preempted with a terminal rejected status, or drained with a confirmed handoff.
Instrument the message ledger for orphan detection
Every submission needs an idempotent ledger key tied to the E.164 recipient and template reference. On preemption, the ledger must show either a handoff event or a terminal failure, never a limbo state. Run a drain window test: hold 200 to 500 messages in accepted, confirm the drain completes within the stated MRC window, and reconcile counts against the DLR receipts from the rail.
Gate duplicate sends at sender and template level
Duplicates usually enter during drain handoff when the standby replays an accepted message the primary already dispatched. Enforce a sender and template gate: hash the sender ID plus template reference plus recipient into the message key, and reject any key that already has an in-flight or delivered DLR receipt.
Validate webhook egress ordering and latency
Webhook egress must preserve the order the standby expects: preemption notification before drain completion, drain completion before failover announcement. Measure p95 latency for each event into the ledger and alert on inversion. Run a failover drill with a synthetic primary loss and confirm the standby emits exactly one preemption event, one drain-complete event, and no orphaned egress retries.
Record evidence and shortlist routes
Assemble the evidence pack: preemption trigger timestamps, drain completion times, orphan count, duplicate count, DLR receipt parity between primary and standby, and webhook latency percentiles. Each item needs a pass threshold agreed before the drill.
Start with IOSOR
Run this as a dated checklist on one channel and corridor before failover counts on the standby. Confirm, in order: preemption exits every in-flight job in a terminal state; drain finishes inside the declared window; ledger reconciliation shows zero orphans and zero duplicate DLR receipts; sender and template gate rejects the replay injection; webhook egress emits one preemption and one drain-complete event with no inversion.
Related: PAYG hold before first debit · Wallet stop-lines before production.
IOSOR takeaway
Split the standby rail lifecycle into two states. Each item needs a pass threshold agreed before the drill (/tools/brief · DLR / webhook).
Was this guide helpful?
Related guides
- Calibrate Route Health Probe Cadence Before Failover Switch
Set probe intervals per SMS, voice, and email route so failover fires on real DLR and webhook degradation, not probe noise. Compare partner health-signal depth in /tools/brief.
- Failover Route Switch Rollback Verification Gate for Safe Reversion
Verify rollback readiness before committing a failover route switch: DLR receipts, webhook latency, sender gates, and partner route comparison via /tools/brief.
- Verify Consent Scope Sync Before Failover Route Switch
Audit opt-in, opt-out, and channel consent parity across primary and backup routes before switching. Compare partners on consent handoff and audit evidence.












