When sending a large number of notifications in a single createMessage API call, you may encounter client-side timeout errors. This can happen even if our servers ultimately process the request successfully.
The recommended best practice is to reduce the number of notifications (the batch size) in each API request rather than increasing your client's timeout setting.
Why should I reduce the batch size?
- Faster Processing: Smaller requests are processed more quickly by our servers, which helps prevent your HTTP client from timing out while waiting for a response.
- Increased Reliability: If an error occurs with one small batch, it only affects the notifications in that specific request. Other batches can still be processed successfully. In contrast, if a single large request fails, all notifications within it will fail.
API Limits to Consider
When adjusting your batch size, keep the following platform limits in mind:
- Payload Size: The maximum payload size for a single
createMessagerequest is 10 MB. For optimal performance and to avoid potential timeouts, we recommend staying well below this limit. - Rate Limiting: You can make up to 600
/createMessagerequests per minute.
Note on Billing: The number of API requests you make does not affect your billing. You will not be charged more for sending the same number of notifications across multiple smaller requests instead of one large one.
Comments
0 comments
Please sign in to leave a comment.