Notice: If your messaging service is not registered into an A2P campaign, you must register that traffic to send on Twilio’s network. A2P campaign registration will allow you to receive higher MPS on your messaging services.
With the U.S. midterm elections in 2022, Twilio anticipates a significant spike in short code, 10DLC, and toll-free SMS and MMS messaging, starting Tuesday, November 1 through Wednesday, November 9. Additionally, supply constraints on the MMS network in the United States may cause additional delays in deliverability among customers sending large bursts of MMS, particularly when using toll-free numbers.
In the event of downstream congestion among network carriers, it is anticipated that short code, 10DLC, and toll-free MMS traffic may queue for several minutes longer compared to off-peak sending times. If your MMS traffic is queuing for approximately 30 minutes or more, please follow status.twilio.com for the latest updates on downstream provider degradation. Any temporary measures that Twilio may take in response to traffic spikes and downstream congestion will also be communicated on the Status Page.
This guide covers the following topics:
- Queue management strategies
- Does throughput apply to entire messages, or message segments?
- If I have subaccounts, do account-based rate limits apply at the subaccount level?
- What happens if I exceed my configured throughput?
- Is this throughput guaranteed?
- If my account is subject to account-based rate limiting, will my 10DLC traffic still be compliant with A2P requirements in the United States?
Queue management strategies
While Twilio will partner closely with the carriers to deliver every message as quickly as possible, there are several strategies that you can leverage during election week to reduce queueing times across your traffic.
- Send traffic into Twilio in adherence to your provisioned throughput for SMS and MMS
The most effective strategy for reducing queue length during election week is to send messages to Twilio at or below your provisioned rate limits within Twilio for short code, 10DLC, and toll-free messages. Rate limits, also known as throughput, for SMS/MMS messages are provisioned per-number, or at the parent account-level. The throughput configured on your numbers will dictate the speed at which Twilio will service your messages downstream to the carriers.
By rate limiting traffic on your application to match your configured throughput within Twilio, you can avoid building up a backlog of messages. Messages become backlogged when they are sent to Twilio faster than they can be processed downstream towards carriers.
- Use a shorter Validity Period for your time-sensitive messages
If you are using the same number to send messages with mixed use cases, such as one-time passwords and promotional, time-sensitive messages that are sent to Twilio behind a large burst of traffic may functionally expire within the queue.
To prevent messages with a lower latency from becoming stale due to increased queueing times, configure a Validity Period on each message or Messaging Service that reflects the expected delivery window of the message’s use case. For example, an OTP notification should be configured with a low Validity Period of 30 seconds to a few minutes, while a higher Validity Period of 30 minutes to a few hours is more appropriate for promotional traffic that is targeted to a large audience.
The Validity Period parameter is only applicable to the time each message spends inside the Twilio Platform. If traffic congestion is experienced downstream (carriers), the configured Validity Period will not be applicable.
- Implement retries with exponential backoff and continuously monitor API usage
By implementing retries with exponential backoff, you can improve the deliverability of your messages during spikes in traffic. During Elections week, spikes are most commonly associated with launching marketing campaigns or business news. When sending messages to a large audience, carefully monitor your usage through API response headers, to ensure that the number of concurrent requests you are making is at parity with your configured concurrency.
Concurrency is defined as the number of concurrent requests per second that can be made towards all Twilio endpoints. If you exceed your concurrency limit, you may start to receive 429 “Too Many Requests” HTTP error responses. This error indicates that you are sending more API requests than can be supported by the API concurrency Twilio has configured for your account.
During times of increased downstream provider congestion, combining exponential backoff logic with continuous usage monitoring will allow you to more effectively slow requests down. By throttling requests in your application with exponential backoff, downstream queues can be drained with reduced message loss. For instructions on how to implement exponential backoff, you can review our REST API best practices and detailed tips for avoiding 429 error responses.
Does throughput apply to entire messages, or message segments?
For Twilio’s per-number rate throughput on SMS, throughput is measured in message segments per second (MPS). For MMS, there is no concept of "segments", so MPS is measured in MMS messages per second.
For account-based rate limiting, a single MPS value is configured for each sender type in the SMS and MMS channels. This means that SMS from short code numbers can share a different MPS than SMS from toll-free numbers. With account-based rate limiting, customers are given an MPS based on their volume of messages, no matter how many (or how few) senders they have. Although there are no guarantees for downstream capacity, this adds additional predictability for customers managing mixed use case traffic across several number types.
If I have subaccounts, do account-based limits apply at the subaccount level?
Limits are applied on the parent account level, which aggregates all subaccounts associated with the parent. Subaccounts do not provide any additional throughput.
What happens if I exceed my configured throughput?
If you attempt to send more short code SMS or MMS messages at a rate faster than your configured Twilio throughput, the messages exceeding the configured throughput will be queued in the Twilio platform, and then serviced at the configured MPS towards downstream carriers. A default maximum of 4 hours of messages can be accepted into any given queue. You can specify a shorter queue size for your messages by setting a different Validity Period value on your Messaging Service, or in your API requests for each message.
If you queue up so many messages that you exceed your maximum queue size of 4 hours and do no use a Messaging Service, then the messages in excess of the 4 hour limit will start failing, with the Error 30001- Queue overflow. If you are using a Messaging Service, your message requests will be accepted by the API, but will subsequently fail with Error 30001 - Queue overflow.
For more details on Twilio’s standard sending rate limits and queue behavior, see Understanding Twilio Rate Limits and Message Queues.
Is this throughput guaranteed?
No - we cannot guarantee throughput. There are ecosystem-wide limitations around throughput capacity, meaning demand could outweigh supply at peak send times. However, these limits improve our predictability, and reduce the risk around provider overflow. Understanding the traffic patterns and rate limits for a given customer allows Twilio to plan for managing all customer traffic across our platform. The configured rate limits inform our predictions on the maximum volume of messages to perform load tests with, so that we can validate sufficient downstream capacity with carriers.
If my account is subject to account-based rate limiting, will my 10DLC traffic still be compliant with A2P requirements in the United States?
Starting in 2022, A2P 10DLC traffic can be enrolled in account-based throughput. Account-based throughput now acts as a ceiling for subaccounts associated with a parent account on the 10DLC numer type. If account throughput is configured on your parent account, while it won’t affect individual A2P campaign throughput it could affect the parent account’s collective A2P traffic upstream of individual A2P campaigns. Also note that if you intend to send political traffic over Twilio’s network we require registering your A2P 10DLC campaigns to adhere to our messaging policies, for more information read here. Failure to register your 10DLC traffic into the appropriate campaign may result in your traffic getting blocked by carriers due to noncompliance, or overflowed within Twilio due to missing the required throughput necessary to service the traffic load for a given Messaging Service.