> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Throttling best practices

> Handle PlayFab HTTP 429 throttling responses with Retry-After headers, request batching, and rate mitigation strategies to keep API traffic within limits.

When encountering throttling in PlayFab, an HTTP 429 error is returned, signaling that an API call is being throttled. The response header and body includes key information to understand the error.

Example header:

```http theme={null}
HTTP/1.1 429 Too Many Requests
Retry-After: 8
```

Example response body:

```json theme={null}
{ 
  "code": 429, 
  "status": "TooManyRequests", 
  "retryAfterSeconds": 8, 
  "error": "APIClientRequestRateLimitExceeded", 
  "errorCode": 1199, 
  "errorMessage": "The client has exceeded the maximum API request rate and is being throttled" 
} 
```

The **"Retry-After** and **"retryAfterSeconds"** property indicates the wait time in seconds before attempting another request to avoid throttling. If utilizing the latest [cross-platform C/C++ SDK](/services/playfab/sdks/c), the SDK attempts to handle the retry on the caller's behalf. Otherwise, use the below strategies with the retry values to develop custom handling.

## Mitigating throttling issues

If throttling errors persist, consider adopting the following strategies:

1. Review Request Rate
   * Analyze why you're sending a high volume of requests.
   * Evaluate ways to lower the request rate for specific player or title entities targeted by the API.

2. Batching API Calls
   * Reduce frequency by batching API calls.
   * Example: Batch profile updates every 10 seconds instead of updating every second.

## Key takeaways

* Throttling errors prompt an HTTP 429 response with details on the nature of the error.
* Utilize the **Retry-After** and **"retryAfterSeconds"** property to determine the wait time before making another request.
* Evaluate the necessity of high-frequency requests and optimize accordingly.
* Implement batching strategies to alleviate throttling concerns and enhance overall system efficiency.

## See also

* [Economy v2 Limits](/services/playfab/economy-monetization/economy-v2/limits)


## Related topics

- [Throttling in PlayFab](/services/playfab/live-service-management/service-gateway/throttling/what-is-throttling.md)
- [Best practices for calling XBOX services](/services/xbox-services/develop/best-practices/live-best-practices-calling-xbl.md)
- [Best practices for the RTA service](/services/xbox-services/fundamentals/rta/concepts/live-rta-best-practices.md)
- [Best practices](/services/xbox-services/develop/best-practices/index.md)
- [Insights Best Practices](/services/playfab/data-analytics/legacy/insights/best-practices.md)
