Overview

Tatango implements rate limiting to ensure fair usage of our API resources and maintain service stability. The rate limit is applied on a per-API key basis.

Default Limits

  • Default Rate: 10 requests per second
  • Reset Period: Every one second
  • Daily Quota: 10,000 requests per day, reset at midnight UTC

For trusted senders with higher volume needs, these limits can be increased upon request. Contact our support team to discuss your specific requirements.

Handling Rate Limits

When you exceed the rate limit, the API will respond with a 429 HTTP status code (Too Many Requests). It is recommended to implement exponential backoff with jitter to prevent thundering herd problems.

Rate Limit Response Example

HTTP/1.1 429 Too Many Requests
Content-Type: application/json
x-amzn-RequestId: 5f4e1d2a-1234-5678-9abc-def012345678
x-amz-apigw-id: abc123XYZ=
x-amzn-ErrorType: TooManyRequestsException

{
  "message": "Too Many Requests"
}

Exponential Backoff with Jitter Example

Here’s an example of handling rate limits with exponential backoff in JavaScript:

async function makeRequestWithRetry(url, options, maxRetries = 3) {
  const baseDelay = 1000; // Base delay of 1 second
  const maxDelay = 32000; // Maximum delay of 32 seconds

  for (let attempt = 0; attempt < maxRetries; attempt++) {
    try {
      const response = await fetch(url, options);
      
      if (response.status === 429) {
        // Calculate exponential backoff
        const exponentialDelay = Math.min(
          baseDelay * Math.pow(2, attempt),
          maxDelay
        );
        
        // Add random jitter (between 0-100% of the delay)
        const jitter = Math.random() * exponentialDelay;
        const totalDelay = exponentialDelay + jitter;
        
        console.log(`Rate limited. Retrying in ${Math.round(totalDelay/1000)} seconds...`);
        await new Promise(resolve => setTimeout(resolve, totalDelay));
        continue;
      }
      
      return response;
    } catch (error) {
      if (attempt === maxRetries - 1) throw error;
    }
  }
}

Increased Rate Limits

If you need higher rate limits, we offer increased limits for trusted senders. To request an increase:

  1. Contact our support team
  2. Provide your use case and expected request volume
  3. We’ll review your request and adjust limits accordingly

Remember that even with increased limits, it’s important to implement proper rate limit handling in your code to ensure reliable operation.