Architecting a Resilient Multi-Provider Fallback Engine for Notifications
Sonu Kumar
Lead Platform Architect
When your product scales to millions of users, notification delivery failure is not just an inconvenience — it directly impacts revenue and user trust. Password reset OTPs that arrive 5 minutes late lead to abandoned logins, while delayed transactional emails degrade customer experience.
In this technical breakdown, we share the engineering architecture behind NotifySetu's zero-downtime provider fallback engine.
The Multi-Provider Challenge
Most legacy notification systems bind code directly to a single provider API SDK (such as SendGrid or Twilio). However, single providers inevitably experience: 1. **Regional Outages:** Cloud infrastructure or carrier route failures. 2. **Rate Limit Throttling:** Unexpected traffic bursts triggering 429 Too Many Requests. 3. **Carrier Rejections:** Strict regulatory filters (such as DLT in India) blocking specific SMS templates.
The NotifySetu Fallback Circuit Breaker
NotifySetu decouples the dispatch request from specific provider implementations. When an application calls `/v1/notifications/send`, the platform executes a 3-step routing pipeline:
1. **Health Verification:** Checks the real-time circuit breaker status of the primary provider (e.g., SendGrid). 2. **Dispatch Attempt:** Sends payload over TLS 1.3 with a 500ms timeout budget. 3. **Automatic Reroute:** If primary returns 5xx or times out, the payload is immediately handed to the secondary provider (e.g., AWS SES or Plivo).
{
"routingPolicy": {
"primary": "SENDGRID",
"fallbacks": ["AWS_SES", "MAILGUN"],
"maxLatencyMs": 500
}
}Results & Benchmarks
In production tests, automatic failover reduced failed notification dispatches from **1.4% to less than 0.001%** across 50 million dispatches.
Sonu Kumar
Lead Platform Architect at NotifySetu