Sizing your environment based on expected throughput

If your WABA number receives more requests that it can effectively handle, the message queues can become overloaded, which may lead to a disconnection from the WhatsApp servers. As a result, you will no longer be able to send or receive messages using that number.

To avoid this, it's important to manage the volume of messages you send and receive, as exceeding the capacity of your WABA number can cause disruption to your messaging service. Two strategies can be adopted to prevent such cases.

Minimum speed of web-hook receiving endpoint

To ensure that your setup can handle your desired use cases and avoid any disconnections, it's important to calculate the minimum requests per second that your web-hook receiving endpoint needs to handle. We recommend using the following formula to calculate this value:

min_webhook_rps = (max_outgoing_messages * 3) + expected_messages_per_second

Note: The factor of three is used because typically, for each sent message, three notifications will be received (sent, delivered, read).

As an example, let's imagine your use case needs to send 20 messages per second, and plans to receive no more than 30 messages per second from your users:

min_webhook_rps = (20 * 3) + 30 = 90

In the above example, your web-hook receiving endpoint has to be able to receive at least 90 messages per second. To determine the potential capacity of your endpoint, we recommend using wrkarrow-up-right, an open-source HTTP benchmarking tool or a similar alternative.

Rate Limiting outgoing messages

In order to manage the frequency at which your integration sends messages and thus be sure to not overload your WABA number, we recommend implementing a rate-limiting mechanism. For more information on this topic, please visit the following pagearrow-up-right.

For Regular licensesarrow-up-right (single instance WhatsApp API accounts with 360dialog hosting) we highly recommend implementing a rate-limiting strategy to ensure that outgoing messages do not exceed 20 requests per second. This is necessary to avoid overloading your WABA instance. If your use case requires higher throughputs, please reach out to your Partner Manager to explore the option of upgrading to Multi-Connect setups."

circle-info

To prevent unwanted delays or message loss, it's crucial to conduct extensive research and tailor your implementation to meet the specific needs of your application. Additionally, please ensure that you adhere to the fair usage quotas of the 360dialog API and services to avoid the risk of rate limiting and temporary bans.

If you anticipate the need for high message volumes, please reach out to your Partner Manager for assistance well in advance of the event.

Last updated

Was this helpful?