http_backoff

Function http_backoff 

Source
pub fn http_backoff() -> ExponentialBackoff
Expand description

Create exponential backoff configuration for HTTP API retries.

HTTP API calls (e.g., bindcar sidecar) use faster retry cycles than Kubernetes API since they target local/nearby services that should fail fast.

§Configuration

  • Initial interval: 50ms
  • Max interval: 10 seconds
  • Max elapsed time: 2 minutes total
  • Multiplier: 2.0 (exponential growth)
  • Randomization: ±10% (prevents thundering herd)

§Retry Schedule

With these settings, retries occur at approximately:

  1. 50ms
  2. 100ms
  3. 200ms
  4. 400ms
  5. 800ms
  6. 1.6s
  7. 3.2s
  8. 6.4s
  9. 10s (capped at max interval) 10-12. 10s intervals until 2 minutes elapsed

§Returns

Configured ExponentialBackoff instance