Overview
Automated failover handles message delivery by automatically switching to backup providers or channels when primary delivery methods fail. When a provider experiences outages, rate limiting, or timeouts, Courier automatically routes messages through alternative paths without manual intervention.Key Concepts
Failover Triggers
Courier initiates failover when downstream providers return specific error conditions:408Request Timeout: Provider response takes too long429Too Many Requests: Rate limiting or throttling detected>=500Server Errors: Internal server errors, service unavailable
Failover Types
- Provider Failover: Switch between different providers within the same channel (e.g., SendGrid → AWS SES for email)
- Channel Failover: Switch between different communication channels (e.g., email → SMS → push)
- Timeout-Based Failover: Automatically trigger failover based on response time thresholds
Configuration
Provider Failover
Set up multiple providers within a single channel to create redundancy at the provider level:Provider Failover Example
Configure SendGrid as backup for AWS SES. If SES experiences an outage or rate limiting, Courier automatically switches to SendGrid for email delivery.

Provider Failover Configuration
- Template channel settings: Configure provider priority in the template designer
- Send API: Use
message.channels.[channel_name].routing_methodproperty
- Email redundancy: SendGrid + AWS SES + Mailgun
- SMS backup: Twilio + MessageBird + Plivo
- Push notifications: Firebase FCM + Apple Push + OneSignal
Channel Failover
Set up multiple communication channels to ensure message delivery when specific channels fail or users lack contact information:Channel Failover Example
Configure Best Of: Email → Push → SMS routing. Courier tries email first, then push if email fails, and finally SMS if both previous channels fail.
- Template routing: Use “Best Of” channel configuration in template settings
- Send API: Configure via
message.routingproperty in your Send API requests
- Contact coverage: Reach users even when primary contact info is missing
- Delivery assurance: Multiple paths increase successful delivery rates
- User preferences: Respect user channel preferences while maintaining backup options
Advanced Configuration
Timeout Management
Control when failover occurs by configuring timeout thresholds at different levels: Default Timeouts:- Provider timeout: 5 minutes (300000ms) - Time to wait for individual provider responses
- Channel timeout: 30 minutes (1800000ms) - Time to attempt all providers in a channel
- Message timeout: 72 hours (259200000ms) - Overall delivery attempt window
- Global timeouts: Apply to all providers/channels unless overridden
- Channel-specific timeouts: Override global settings for specific channels
- Provider-specific timeouts: Override global settings for specific providers
Precedence Rule: More specific timeouts take precedence. For example,
message.providers.slack.timeout overrides message.timeout.provider for Slack delivery attempts.-
Global Configuration:
-
Channel-Specific Overrides:
-
Provider-Specific Overrides:
Complete Configuration Example
Related Resources
Channel Priority
Learn how to configure intelligent channel routing and fallback logic
Delivery Pipeline Resilience
Understand automatic retry strategies and delivery reliability
Message Logs
Monitor failover behavior and delivery success rates
Send API Reference
Complete API documentation for timeout and routing configuration