IOSOR Learn
SMS DLR Webhook Deduplication & Idempotency Gate
Verify carrier delivery receipts process exactly once across redundant webhook endpoints before trusting DLR-based billing reconciliation or failover triggers.
Lead Telecom & Routing Architect · Lausanne, CH
Engineers must confirm every carrier delivery receipt is ingested exactly once across redundant webhook endpoints before relying on DLR data for billing reconciliation or automated failover decisions. Duplicate or missing receipts distort delivery rates, trigger false alerts, and corrupt partner payouts.
DLR Receipt Uniqueness Keys
Extract the carrier message ID, recipient MSISDN in E.164, and timestamp to form a composite deduplication key. Store keys in a low-latency set with TTL matching the longest carrier retry window (typically 72 hours). Reject any webhook payload whose key already exists; log the collision with source IP and carrier code for audit.
Idempotent Processing Pipeline
Design the ingestion handler as a pure function: given a deduplication key and payload, either persist the DLR event once or return a no-op response. Use database unique constraints or distributed locks to serialize concurrent deliveries of the same receipt. Never mutate billing aggregates until the idempotent write succeeds.
During pre-flight verification, validate that automatic failover thresholds trigger deterministic rerouting without duplicating outbound segments or exhausting retry backoff budgets under peak regional load.
Webhook Endpoint Redundancy & Ordering
Deploy at least two geographically separate endpoints behind a shared load balancer. Ensure the load balancer preserves payload order per sender IP using consistent hashing on the deduplication key. Carriers may retry out of order; the idempotency gate must absorb reordering without gaps.
Carrier Retry & Timeout Contracts
Document each carrier's retry schedule, maximum attempts, and acknowledgment timeout. Configure your webhook response SLA below the shortest carrier timeout (often 2 seconds). Return 2xx only after the deduplication check passes; any 5xx or timeout invites a carrier retry that must not create duplicates.
Observability & Reconciliation Metrics
Emit counters for received, deduplicated, accepted, and rejected receipts per carrier and endpoint. Alert on deduplication rate spikes (>0.5%) or latency p99 > 500 ms. Run nightly correlation jobs comparing accepted DLR counts against carrier billing files; investigate any delta > 0.1%.
Start with IOSOR
Compare verified partner routes for DLR webhook reliability and deduplication guarantees using Decision Brief. Cross-reference with How to Reconcile SMS DLR Statuses Against Provider Delivery Logs, Multi-Carrier DLR Correlation Audit for Route Health, and SMS Webhook Signature Rotation for end-to-end operational coverage.
IOSOR takeaway
Extract the carrier message ID, recipient MSISDN in E.164, and timestamp to form a composite deduplication key. Run nightly correlation jobs comparing accepted DLR counts against carrier billing files; investigate any delta > 0.1% (/tools/brief · DLR / webhook).
Was this guide helpful?
Related guides
- SMS Route Cost-Band Verification and Failover Readiness Gate
Verify quoted SMS route cost bands against carrier and aggregator tiers, then confirm failover routes preserve delivery SLAs before committing volume.
- SMS Route Cost-Band Verification Before Volume Commitment
Verify quoted SMS cost bands against real carrier and aggregator route economics, audit DLR and failover behavior, then compare partner routes before committing campaign volume.
- Audit SMS Webhook Signatures Before Provider Failover
Verify SMS webhook signing, replay protection, and acknowledgement behavior before switching providers, then compare partner routes and webhook guarantees in Decision Brief.












