Client Retry Logic and Retriable HTTP Status Codes for Privacera dataserver¶
This document explains how the client retry mechanism works in Privacera dataserver, including which HTTP status codes trigger retries, which do not, and how retry attempts are executed for transient failures.
Overview¶
The Privacera DataServer client retry mechanism is designed to automatically handle temporary or transient failures such as network interruptions, service unavailability, or short-lived backend errors. Retries are performed only for specific retriable HTTP status codes where a subsequent attempt is likely to succeed, while client errors and successful responses are never retried. The retry behavior uses a fixed retry interval with a capped maximum retry count, improving reliability without impacting overall system stability or causing excessive request retries.
Retriable HTTP Status Codes¶
The system automatically retries requests when it encounters the following HTTP status codes:
| Status Code | Description |
|---|---|
| 408 | Request Timeout |
| 429 | Too Many Requests |
| 500 | Internal Server Error |
| 502 | Bad Gateway |
| 503 | Service Unavailable |
| 504 | Gateway Timeout |
These errors typically indicate temporary conditions, such as network latency, service overload, or upstream service disruptions, which may resolve within a short time.
Non-Retriable Status Codes¶
The system does not retry requests for the following cases:
Successful Responses¶
- 200–299: Requests that complete successfully do not require retries.
Client Errors¶
- 400 – Bad Request
- 401 – Unauthorized
- 403 – Forbidden
- 404 – Not Found
These errors generally indicate client-side issues, such as invalid requests, authentication failures, or missing resources, and retrying them would not resolve the problem.
Retry Mechanism Behavior¶
The client retry mechanism operates with the following configuration:
- Maximum Retry Attempts:
150 - Retry Interval:
200 ms(0.2 seconds) between each retry - Retry Stop Condition:
- The request succeeds
- All retry attempts are exhausted
This ensures that the system remains resilient to transient failures while preventing infinite retry loops.
- Prev topic: Troubleshooting for Privacera DataServer