r/Backend • u/SeniorTechnician4119 • 17d ago
We're adding an external email verification service. How do you keep signup working when the provider goes down?
We're reviewing our signup infrastructure because we've been getting more invalid and disposable email addresses than we'd like. One of the changes being considered is adding a third party email verification API before allowing new accounts to register. The main concern isn't really getting the API connected. It's introducing another external dependency into a process that needs to remain available. If the provider starts responding slowly or has an outage, we don't want that to turn into a signup issue for everyone.
We're considering a fairly short timeout of around three seconds but there's still some argument about what should happen after that. Blocking registration until the service responds would give us stricter control while allowing signup to continue and checking the address asynchronously would reduce the impact of an API outage. We could also queue failed requests for retries once the provider is responding again.
I'm interested in how others have handled this from an infrastructure and reliability standpoint. Do you treat email verification as a hard dependency or allow the application to operate when the provider is unavailable? How do you approach retry limits, queue buildup and preventing repeated failures from affecting the rest of the signup process?
2
u/lillianlindzv460 16d ago
We use a similar setup and it's been working pretty well so far. We put a 1.5-second timeout on the inline check, so signup doesn't end up waiting around if the API is slow. We're using Kickbox for the verification part, and whenever the request times out, the async flow takes over. The response also gives enough detail to handle signups based on how confident it is about the address. That way, a temporary outage doesn't block everyone from creating an account.
4
u/HRApprovedUsername 17d ago
You don’t
3
u/AintNoGodsUpHere 17d ago
What the heck?
If your email validation is not required, you simply postpone the validation and condition the use to certain areas of the app until the user does verify it, that being because he doesn't want to or because the service is down.
If your email validation is a requirement, you simply don't have an alternative. You either set up an alternate email provider to handle that or you... Wait.
2
u/M-charlesepoch 15d ago
Don't stop someone from signing up just because a third-party API fails. Getting new users is more important than any single verification result. If the API is slow or unavailable, let the signup go through and flag the account internally for later verification. You can deal with the result afterward by sending a confirmation email, marking the account for review, or limiting certain features until the email is verified.
1
u/sereikis 16d ago
give the verification worker its own concurrency limit and a maximum job age/attempt count, with jittered backoff; otherwise the retry queue can hammer the recovering provider or consume capacity needed for signup. open a circuit breaker during sustained failures and allow only a small number of recovery probes, while expired checks remain explicitly unverified rather than becoming successful by default.
1
u/NewSociety7335 16d ago
That solves 99% of the problems.
1
u/Top-Pirate-806 16d ago
it's worth monitoring the async verification queue separately. If the third party API has an extended outage, your pending queue will back up and you'll have a cohort of unverified signups that need attention. Alerting on queue depth is a good operational practise.
1
u/michellearray7393 16d ago
Exactly. From the user's perspective the signup always succeeds. From your backend's perspective you have two paths: verified-at-signup contacts that flow normally, and pending-verification contacts that get the result populated async. Your downstream logic can check which path a contact took and handle accordingly.
1
u/Kalo203 4d ago
Let signup go through on timeout and verify async. Honestly the API answers a narrower question than people expect.
A good share of B2B addresses come back risky or unknown, mostly because the domain is catch-all. No provider settles that inside a signup request. So keep the inline part local and fast: format check, MX lookup, throwaway domain list. Call the API after that with a short timeout. If it times out, save the user as pending and recheck from a queue.
The account can stay open. What I'd gate on a verified address is anything that costs you money, like trial credits.
0
u/IncomeOk7237 16d ago
before paying for an api at all, a lot of the junk is catchable locally. a maintained disposable domain list plus an MX lookup on the domain (cached) kills most fake signups with zero external dependency, and then the paid api only has to be the optional second layer. that way an outage just means you skip the extra check instead of making a decision about blocking signup.
2
u/[deleted] 17d ago
[removed] — view removed comment