~learn.
0:00 / 1:37
Mock interview · Paisly

The SMS provider says 200 OK. The login codes never arrive.

transcript

Your SMS provider answers 200 OK. Every single send. But most login codes aren't arriving in time.

The interviewer's curveball. Paisly's main provider, Dakiya. Normally 95 percent of codes arrive within 30 seconds. Tonight, at 8:05: 40 percent. Users are tapping Resend.

Here's the trap. Judge health by the API status, and Dakiya looks perfect. The candidate says it plainly: you'd keep sending into a black hole.

So health can't come from the API status. It comes from delivery receipts. How many codes arrive within 30 seconds. Receipts come late. So also watch codes actually typed in. That signal is Paisly's own. Both in a sliding two-minute window, per provider.

Dakiya falls from 95 to 40. Its breaker trips. The router shifts traffic to SandeshNet, up to its 150 a second. A normal evening is 40 a second. It fits easily.

Now Resend. Send a new code? Dakiya's late SMS arrives with the old one. The user types it. Rejected. Two codes, one confused user. So resend the same code, through the other provider. Whichever arrives first works.

And SandeshNet works tonight. It's been carrying 10 percent all along. A spare you never use is a spare you don't trust.

200 OK means the provider accepted it. Not that a phone got it. Judge a provider by what arrives.

Full breakdown in the lecture.