Retry Policies
The VAPIXService uses Polly for resilient HTTP communication with cameras.
Why Retry?β
Cameras are physical devices on real networks. Common transient failures include:
- Network timeouts (Wi-Fi, cellular, satellite links)
- Camera temporarily busy (processing previous request)
- Intermittent connectivity in remote locations
Polly Configurationβ
The HTTP client is configured with Polly retry policies:
- Retry count β Configurable number of retries per request
- Backoff β Wait between retries to avoid hammering a busy camera
- Circuit breaker β After consecutive failures, the circuit opens and requests fail fast for a cooldown period
What Triggers Retryβ
| Scenario | Retried? |
|---|---|
| HTTP timeout | Yes |
| 5xx server error | Yes |
| Connection refused | Yes |
| 4xx client error | No (not transient) |
| Camera returns empty response | Depends on configuration |
Dependenciesβ
- Polly β Retry, circuit breaker, timeout policies
- Microsoft.Rest.ClientRuntime β HTTP client infrastructure
- Application Insights β Retry and failure telemetry