Skip to the page

Common backend failure patterns · mid

Failures in partners: SMS, banks and gateways

Partners fail in ways your API calls do not show: a 200 response only means accepted. You measure what users get, route around the failure, and prepare backups before you need them.

The notes

What you must know

  • A 200 from an SMS API means only "accepted". Delivery reports and the OTP verify rate (codes verified divided by codes sent) show what users actually get.
  • Break results down by mobile operator, region and provider. A single large operator failing is a common pattern.
  • In the first 15 minutes: other ways to log in (WhatsApp or voice OTP, email OTP, a trusted device), a longer OTP validity, a clear message in the app, and an escalation to the provider with example numbers and times.
  • In India, business SMS needs a template and sender header registered on the operators DLT platform. Since Dec 2024 operators reject messages whose chain of senders is not declared (TRAI). A backup provider never registered and tested fails on day one.
  • Resend storms cost money and add load. Use a cooldown timer, a cap per number, and resend the same OTP within its validity.
  • Long term: two or more providers with routing per operator based on live delivery rate, a circuit breaker based on delivery health (not API status), and a small share of real traffic on the backup every day.
  • When a partner has planned maintenance, make sure notices go to a team mailbox and drive a maintenance calendar. Mark the broken payment method unavailable and steer users to others.
  • Make failed attempts clean: no money taken without an order.

The red pen

Common traps: mistake → fix

  • Mistake: If the API says 200, the message arrived

    Fix: 200 means accepted only.

  • Mistake: A backup provider we never use is a backup

    Fix: an untested backup fails when needed.

  • Mistake: More resends fix delivery problems

    Fix: they add cost and load.

Easy to hard

Questions interviewers ask, easy to hard

  1. OTP SMS stop arriving on a sale evening. What do you do?
  2. How do you find which operator is failing?
  3. How would you design the SMS sending to survive a provider outage?
  4. One bank UPI is down. What do you do for users right now?

Your first interview is free

Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.

Start your free interview