Retry Policies
Standardized retry behavior for all Aevum Zenth API endpoints and distributed services to ensure resilience, prevent thundering herds, and maintain system stability.
Implement exponential backoff with full jitter, cap retries at 3 attempts, and strictly respect Retry-After headers. Never retry on 4xx errors except 429 and 408. All mutations must use idempotency keys.
Core Retry Principles
Aevum Zenth operates across a globally distributed mesh. Transient failures are expected. Your client implementations must adhere to these guidelines to prevent cascading failures and respect service quotas.
- Max Attempts: 3 (initial + 2 retries)
- Base Delay: 500ms
- Max Delay: 10s
- Jitter: Full randomization within [0, current_delay]
- Timeout: 8s request timeout, 3s read timeout
HTTP Status Code Handling
Retry behavior is strictly determined by the HTTP status code returned by the endpoint. The following table defines the expected behavior:
| Status Code | Description | Retry Action | Notes |
|---|---|---|---|
| 2xx | Success | NO RETRY | Process response immediately |
| 4xx | Client Error | NO RETRY | Fix request payload/headers. Exception: 408, 429, 409 |
| 429 | Too Many Requests | RETRY | Mandatory: Read Retry-After header. Do not apply backoff formula. |
| 500 | Internal Server Error | RETRY | Transient. Apply exponential backoff. |
| 502/503/504 | Gateway/Overload | RETRY | Load balancer or upstream failure. Apply backoff. |
| 408 | Request Timeout | CAUTION | Only retry if idempotency key is provided or method is safe |
Exponential Backoff Configuration
Implement backoff using the following parameters. Full jitter is required to prevent synchronization of retries across distributed clients.
Idempotency & Safe Retries
Retrying non-idempotent requests can lead to duplicate transactions, double-charges, or corrupted state. Aevum Zenth enforces strict idempotency rules:
- Safe Methods:
GET,HEAD,OPTIONSare inherently idempotent. Safe to retry. - Unsafe Methods:
POST,PUT,PATCH,DELETErequire anIdempotency-Keyheader. - Key Format: UUID v4, case-insensitive, max 128 characters.
- Keys are cached for 24 hours. Reusing a key returns the original response without reprocessing.
SDK Implementations
Official Aevum Zenth SDKs include built-in retry logic compliant with these policies. Enable it via configuration:
Enterprise & Custom Policies
For high-throughput or mission-critical integrations (Enterprise Tier), Aevum Zenth supports custom retry configurations via dedicated VPC endpoints and circuit breaker patterns. Contact your solutions architect to configure:
- Dedicated retry queues with at-least-once delivery guarantees
- Service-specific backoff overrides
- Real-time retry telemetry via
X-AZ-Retry-Trace-Id - SLA-backed automatic failover to regional mirrors
Do not implement linear backoff or retry all requests synchronously. Always randomize delay intervals. Aggressive retry patterns may trigger automatic IP throttling or rate limit bans.