Jitter is important to avoid every cloudflared in the world trying to reconnect at t=1, 2, 4, etc. That could overwhelm the backend. But if each cloudflared randomly waits for up to 2, then up to 4, then up to 8 etc, then the retries get spread out evenly across time. On average, wait times should be the same (e.g. instead of waiting for exactly 1 second, cloudflared will wait betweeen 0 and 2 seconds). This is the "Full Jitter" algorithm from https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/ |
||
|---|---|---|
| .. | ||
| backoffhandler.go | ||
| backoffhandler_test.go | ||
| cloudflare_status_page.go | ||
| cloudflare_status_page_test.go | ||
| external_control.go | ||
| metrics.go | ||
| proxy.go | ||
| proxy_test.go | ||
| reconnect.go | ||
| reconnect_test.go | ||
| supervisor.go | ||
| tunnel.go | ||
| tunnel_test.go | ||
| tunnelsforha.go | ||