> ## 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.

# 스로틀링 모범 사례

> Retry-After 헤더가 있는 PlayFab HTTP 429 스로틀링 응답, 요청 일괄 처리 및 속도 완화 전략을 처리하여 API 트래픽을 제한 내로 유지합니다.

PlayFab에서 스로틀링이 발생하면 HTTP 429 오류가 반환되어 API 호출이 스로틀링되고 있음을 나타냅니다. 응답 헤더와 본문에는 오류를 이해하는 데 필요한 주요 정보가 포함되어 있습니다.

헤더 예제:

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

응답 본문 예제:

```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" 
} 
```

**"Retry-After"** 및 **"retryAfterSeconds"** 속성은 스로틀링을 피하기 위해 다른 요청을 시도하기 전에 대기해야 할 시간을 초 단위로 나타냅니다. 최신 [크로스 플랫폼 C/C++ SDK](/services/playfab/sdks/c)를 활용하는 경우, SDK가 호출자를 대신하여 재시도를 처리하려고 시도합니다. 그렇지 않으면, 재시도 값과 함께 아래 전략을 사용하여 사용자 지정 처리를 개발하세요.

## 스로틀링 문제 완화

스로틀링 오류가 지속되면 다음 전략을 채택하는 것을 고려하세요.

1. 요청 속도 검토
   * 왜 많은 양의 요청을 보내고 있는지 분석합니다.
   * API가 대상으로 하는 특정 플레이어 또는 타이틀 엔티티에 대한 요청 속도를 낮출 수 있는 방법을 평가합니다.

2. API 호출 일괄 처리
   * API 호출을 일괄 처리하여 빈도를 줄입니다.
   * 예: 매초 업데이트하는 대신 10초마다 프로필 업데이트를 일괄 처리합니다.

## 주요 요약

* 스로틀링 오류는 오류의 성격에 대한 세부 정보와 함께 HTTP 429 응답을 발생시킵니다.
* **Retry-After** 및 **"retryAfterSeconds"** 속성을 활용하여 다른 요청을 하기 전에 대기 시간을 결정합니다.
* 고빈도 요청의 필요성을 평가하고 그에 따라 최적화합니다.
* 스로틀링 문제를 완화하고 전체 시스템 효율성을 향상시키기 위해 일괄 처리 전략을 구현합니다.

## 참고

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


## Related topics

- [PlayFab의 스로틀링](/ko/services/playfab/live-service-management/service-gateway/throttling/what-is-throttling.md)
- [RTA 서비스 모범 사례](/ko/services/xbox-services/fundamentals/rta/concepts/live-rta-best-practices.md)
- [XR-067 멀티플레이어 세션 상태 유지](/ko/publishing/certification/xr/xr-067.md)
- [Insights 모범 사례](/ko/services/playfab/data-analytics/legacy/insights/best-practices.md)
- [XblDisableAssertsForXboxLiveThrottlingInDevSandboxes](/ko/reference/live/xsapi-c/xbox_live_global_c/functions/xbldisableassertsforxboxlivethrottlingindevsandboxes.md)
