RetryOptions¶
Namespace CryptoService.Sdk.
How the client retries a failed attempt. The same contract holds in every Crypto Service SDK.
Remarks¶
An idempotent call (every GET and every POST that cannot create or delete server state) is retried after HTTP 429, 503 or 504, after a connection failure and after an attempt that timed out. A stateful call (/v2/keys/generate, /v2/keys/delete, every */keygen, /v2/kms/create-key and /v2/opaque/register/*) is retried only after 429 or 503, when the server certainly did not act; never after a 504 or a lost connection, when it may have.
Between attempts the client waits an exponential backoff with full jitter: for retry n, a random time between zero and min(MaxDelay, InitialDelay × 2^(n-1)). A Retry-After header (seconds or an HTTP date) replaces the backoff; when it asks for longer than RetryOptions.MaxDelay, the client stops and reports that answer instead of waiting.
Methods¶
ToString()¶
Properties¶
InitialDelay¶
The backoff ceiling of the first retry. Defaults to 200 ms.
| Exception | When |
|---|---|
ArgumentOutOfRangeException |
The value is negative. |
MaxDelay¶
The longest wait between two attempts, for the backoff and for a Retry-After. Defaults to 2 seconds.
| Exception | When |
|---|---|
ArgumentOutOfRangeException |
The value is negative. |
MaxRetries¶
Retries after the first attempt. Defaults to 0: no retry.
| Exception | When |
|---|---|
ArgumentOutOfRangeException |
The value is negative. |