Configure Retry on Error
⚙️ Advanced
·
Updated 3 weeks ago
Configure Retry on Error
Automatically retries failed requests to the backend — ideal for brief outages, backend restarts, or load balancing with multiple backends.
How does it work?
Client → Caddy → Backend (Attempt 1: 502)
→ Backend (Attempt 2: 502)
→ Backend (Attempt 3: 200 OK) → Client sees normal response
With multiple backends, retries rotate between backends:
Client → Caddy → Backend A (502)
→ Backend B (200 OK) → Client sees normal response
Configuration
| Parameter | Range | Default |
|---|---|---|
| Retry Count | 1 – 10 | 3 |
Setup
- Create or edit route
- Enable Retry on Error toggle
- Set Retry Count (1-10)
- Save
Important Notes
- POST/PUT/DELETE are also retried. Only enable when the backend supports idempotent operations.
- Retries happen immediately — no exponential backoff.
- Retry count 1 = maximum 2 requests to backend.
- With open circuit breaker, no retries are attempted.
- Only available for HTTP routes.