Design One-Time Passcode SMS Delivery With Carrier Failover

Last updated: November 29, 2026

Quick Overview

Design the service that sends sign-in and payment verification codes by SMS to Amazon customers worldwide, choosing among several SMS providers and failing over when one is slow or failing in a country.

Amazon
System Design
Software Engineer
Amazon
November 29, 2026
Software Engineer
System Design Round
System Design
Medium

0

0

0 solved


Design the service that sends sign-in and payment verification codes by SMS to Amazon customers worldwide, choosing among several SMS providers and failing over when one is slow or failing in a country.

Fits Amazon identity and notification teams. The interviewer checks that you treat delivery as latency sensitive and unreliable, route per country based on live provider quality, and keep the codes themselves secure.

What the Interviewer Expects
  • Generate and store codes securely with short expiry and attempt limits
  • Route per destination country to the best provider by live success rate and latency
  • Detect provider degradation from delivery receipts and fail over
  • Allow resend with a different provider and voice call fallback
  • Rate limit per phone number and per account to stop abuse
Key Topics to Cover
Provider routing
Delivery receipts
Circuit breakers
Rate limiting
OTP security
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How do you know an SMS was actually delivered?
  • How would you stop SMS pumping fraud that costs money?
  • Why not send through two providers at once every time?
  • How would you add app-based push approval as an alternative?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Functional: send_otp(account, phone, purpose) delivers a 6 digit code; verify(account, code) checks it. Support resend and voice fallback. Non-functional: code arrives within 10 seconds fo...

High-Level Design
  • OTP service: generates a random code, stores only an HMAC of it with expiry and attempt counter in a low-latency store, and asks the dispatcher to send.
  • Dispatcher: picks a provider for th...

Submit Your Answer
Markdown supported