Skip to main content

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​

ScenarioRetried?
HTTP timeoutYes
5xx server errorYes
Connection refusedYes
4xx client errorNo (not transient)
Camera returns empty responseDepends on configuration

Dependencies​

  • Polly β€” Retry, circuit breaker, timeout policies
  • Microsoft.Rest.ClientRuntime β€” HTTP client infrastructure
  • Application Insights β€” Retry and failure telemetry