Best Practices for QPS and Rate Limiting in High-Concurrency OTP Scenarios

The Importance of Rate Limiting Configuration



Improper management of traffic spikes can overwhelm API interfaces and trigger carrier risk controls, leading to widespread OTP delivery failures.

Key Points for QPS and Rate Limiting Configuration



1. Initial Traffic Assessment


  • Calculate peak business traffic and allow for sufficient redundancy.

  • Do not set rate limit thresholds to exactly match peak traffic levels.


  • 2. Two-Layer Rate Limiting Protection


  • Configure rate limits at the platform level while simultaneously managing traffic on the business application side.

  • Limit the frequency of OTP delivery requests for the same mobile number within a short timeframe.


  • 3. Traffic Scheduling Strategies


  • Queue requests during traffic surges rather than dropping them immediately.

  • Prioritize SMPP for high-volume traffic; use HTTP for low-to-medium concurrency scenarios.

  • Implement monitoring and alerts to provide timely warnings as QPS approaches thresholds.


Sound rate-limiting strategies prevent interface overload and ensure the stability and availability of OTP services amidst traffic fluctuations.