@kodekloud: System Design: Defeating the SMS Retry Storm! 1,000 login requests hit your backend in one second. Your SMS provider only accepts 100. So what happens to the other 900? This is one of the most underrated system design problems out there, and it shows up the moment your app comes back from an outage. Everyone logs in at once, and the "obvious" fixes quietly make things worse. Reject the extra requests and frustrated users smash resend until they DDoS you. Queue everything and codes arrive expired and useless. So which path would you take, and is there a smarter third option? Drop your answer in the comments before you watch. 🔔Subscribe to KodeKloud for more system design, backend, and DevOps breakdowns. #SystemDesign #RateLimiting #BackendDevelopment #SoftwareArchitecture #Coding #DevOps
the common practice is a 1 minute cooldown between each code request
2026-06-19 01:05:44
88
Maruh Akporowho :
Use idempotency
2026-06-18 23:04:37
14
Uche | Software Engineer :
Reject request and disable button and after set countdown timer
2026-06-26 23:20:11
0
Mawuli :
Why don't you add receiving the request code via email too
2026-06-27 08:28:55
0
geez :
Reject request, make sure both the api is rate limited to two requests per minute, and that the frontend button gets disabled with a timer to clarify to the users when they can try again
2026-06-21 22:22:53
4
Eslieh :
I had the same problem on some third part api was accepting 50 requests per second… had to create multiple accounts or in our case multiple senders for sending the sms, built an engine based on round robin’s algorithm, maxes out one sender then uses the next sender and so on, giving the single sender ability to send other sms after the next second.. it’s expensive but, works like a charm 😀
2026-06-20 16:22:39
2
Bentry Taylor :
Make them wait. But group them by time. first 100 wait for 5 seconds then so on and forth
2026-06-20 04:16:51
5
Jake :
why wouldn't you queue with a cool down to prevent duplicates. The cool down is about 90% of the validation time for the first sent code + average time from sent to receive
2026-06-19 08:35:25
13
Ed :
batching will do the thing
2026-06-20 00:12:17
0
Mr Problem :
OTP valid: 5 min
Resend cooldown: 60 sec
Max requests: 5 per hour per phone
Redis queue
Reuse same OTP until expired
2026-06-24 20:25:43
3
C-idea :
Use queue and idempotentcy to prevent duplicate request 😁
2026-06-19 09:32:54
10
GREENALPHINE TECH :
Queue the requests, use another provider or same provider with multiple api keys to increase the number of sms sent try to meet a 3mins mark for all sms to be sent, and mark each request sent with Ip they are from thus ignoring more request from same ip for a period of time 3mins, thus saving cost and request limits in the process while at same time serving more users in need of these codes
2026-06-21 15:05:32
2
Musa Stark :
Use multiple OTP options like Whatsapp, email, phone number
2026-06-19 09:13:21
6
Loven :
Collapse repeated requests to avoid multiple triggers. then implement a short cooldown timer, (1 min) to prevent immediate retries. and then queue excess requests, ensuring we send only within the allowed rate........soft
2026-06-19 18:56:48
4
sam :
use exponential back off for subsequent retries or multi provider fail over routing
2026-06-18 16:54:56
7
I_am_invicible :
Add rate limits to the api calls , disable button until time is up for button to be hit again
2026-06-21 01:20:17
3
TupenEkene :
Use Rate limiting
2026-06-27 07:35:49
0
Chuks :
First off set rate limit on that endpoint per user , then remove duplicate request and add ti task que
2026-06-27 22:39:19
0
CodeBro Library | webdeveloper :
I would tell them to login in after sometime and also I make the send button to be inactive for sometime, so their clicks are useless
2026-06-18 20:36:33
2
retiredcoo :
Increase validity of code
2026-06-19 04:05:28
3
, :
using google authenticator for opt
2026-06-19 14:40:53
3
El sache :
No one here will make any app with more than 1 login per minute
2026-06-19 20:30:43
2
Cameron Clagg :
can you not set a limit on the queue and then reject people when it’s full?
2026-06-19 11:04:14
0
Kai :
Rate limiting the send code requests
2026-06-19 02:43:35
1
To see more videos from user @kodekloud, please go to the Tikwm
homepage.