Routing and failover
Choosing a primary and a backup sending provider
By mailers.io team Published 6 min read
public/media/blog-choose-a-primary-and-backup-provider-cover.webp Everyone agrees that one provider is a risk, and many people connect a second one. Fewer ask what makes a good second provider, or how the pair should behave. This post helps you choose and shows how to build the pairing with the tools mailers.io has today.
What the backup is for
A backup covers the problems that stop one account while another keeps working:
- a limit or quota reached
- a review or pause of the account
- an outage or network problem at the provider
- a revoked or expired credential
It does not cover problems that follow you from provider to provider: a poor list, a spammy message, a domain with a bad record. Put effort into those first. Why one provider is a single point of failure covers both sides.
Choose a backup that fails differently
Two accounts at the same provider fail together when the provider has an incident, and they can be reviewed together. Aim for difference at as many levels as you can.
- A different provider. Amazon SES with Mailgun, SendGrid with Brevo, and so on. Eight API providers are supported, along with Gmail, Microsoft 365 and any SMTP server.
- A different region inside a provider, if you must stay with one. SES has many regions. SendGrid, Mailgun and SparkPost have a US and an EU choice. A regional fault is the usual outage, so this helps, but it does not protect you from an account review.
- A different connection type. An API provider and a mailbox, or an API provider and a generic SMTP relay. A fault in one path, such as an HTTPS endpoint, does not touch the other. Mixing API and SMTP providers lists what changes with the type.
- A different billing account and credential. Do not use the same card, the same owner login or the same API key owner for both, where you can avoid it.
Check the fit before you commit
Look at each candidate for these points.
- Terms for your kind of mail. Providers differ on bulk and cold e-mail. Postmark, for instance, does not allow cold outreach, and mailers.io refuses Postmark servers for sequences for that reason. Read the acceptable-use policy of any provider you plan to use for outreach.
- Limits and approval. Some providers start new accounts in a sandbox or at a low quota and need a request to raise it. Ask for what the backup needs before the day you need it.
- Bounce and complaint feedback. An API provider gives you events by webhook. SMTP, Gmail and Microsoft 365 rely on an IMAP bounce mailbox. Without feedback the backup would send blind.
- Domain support. mailers.io can register your sending domain for SES, SendGrid, Mailgun, Postmark, SparkPost, Elastic Email and Brevo. For ZeptoMail you do it by hand.
- Mailbox limits. Gmail and Microsoft 365 mailboxes have daily limits set by Google and Microsoft. A mailbox is a fine low-volume backup, and a weak one for a large campaign.
- Cost model. Providers charge in different ways, for example by the message, by month or by dedicated IP. mailers.io adds no per-message charge for the provider’s fee: that stays between you and the provider, and mailers.io uses one credit per message from your plan.
How the pair behaves in mailers.io
Every account has a default rule: round robin across your servers, three attempts, failover to the next server on a server fault. It applies on every plan, and it is what you get with no setup.
Two points follow from it.
Both servers take mail all the time. Round robin gives each active server a share, so your second server is in use every day. This is good news for the backup: it has a record, it is warm, and you know it works. It also means that you cannot keep it idle behind a primary by default.
There is no priority setting on current plans. A rule that says “use A unless A fails” is a custom routing rule, and those rules are not available on any plan today. Do not build a plan that depends on it. The ways to get the effect are these.
Option A: shares set by limits
Give the primary a large speed limit and daily cap, and the backup a small one. The backup takes mail until its cap is reached, then steps aside, and the primary takes the rest. If the primary fails, its mail moves to the backup, which is under its cap by definition, and the backup’s cap is the ceiling during the incident. Set the backup’s cap to what you could send in an emergency, within what the provider accepts.
This keeps the backup busy enough to stay warm and gives it a real share of mail. Its weakness is the cap: during a long outage, the backup limits your volume, so mail waits.
Option B: a backup you enable on demand
Connect and test the backup, then disable it. When the primary has trouble, enable it. Enabling wakes any mail that was waiting for a server. This keeps the backup out of normal traffic, which some teams prefer for cost or reputation.
The risk is that it is cold. A server with no history that suddenly takes your whole volume is likely to be limited, and a warm-up ramp needs days. If you choose this option, send a small batch through it every week to keep it in use, and keep its credentials and domain confirmation current.
Option C: equal servers
For many senders the simplest answer is the best one: two servers with equal limits and the default rule. Each takes half, either can carry the load for a time, and nothing is idle. Raise the limits so that each could carry your peak alone, if the providers allow it.
Test the backup like you mean it
A backup is real when you have done these things.
- A connection test and a test e-mail through it alone, from the server page.
- A confirmed From domain, with DKIM and SPF in place. See adding a sending domain.
- A bounce route, shown by a test to an address that does not exist.
- A limit that matches the provider’s quota.
- A drill: disable the primary for a short, quiet period, send a small batch and read the log. See reading provider health and send logs.
Do the drill once a quarter, and after any change of provider settings. Enable the primary again when it is done.
What to expect in an incident
When the primary fails, messages with a server fault move to the backup in the same pass. You will see the attempts in the log, and after five faults in a row on one server you will get a notice. Mail may slow, because the backup has a smaller cap, and the log will say why. Fix the primary, check that it takes mail again and let the rotation settle.
Two accounts do not make bad mail good. They make a good setup able to survive a bad day. The page on e-mail routing lists what rotation and failover cover, and sending servers lists the providers you can connect.
Questions and answers
Can I set one provider as primary and the other as backup?
Not as a priority order. Priority and weighted routing are custom routing rules, which are not part of current plans. You use limits, or keep the backup disabled until you need it.
Does the backup need its own domain setup?
Yes. The sending domain must be confirmed at an API provider, and SPF and DKIM must be right for any provider you send through.
How many servers should I connect?
Two, from different providers, is the useful start. More adds capacity, but also more accounts to keep healthy.
Written by the mailers.io team. Published .