Skip to main content

Timeouts

SDKs support configuring connection and request timeouts:
  • Connection timeout: Maximum time to wait for a TCP connection to be established. This is a “fail fast” timeout that aborts slow connections early.
  • Request timeout: Maximum time to wait for a non-streaming request to complete. For append sessions, this value is also used to determine the SDK-enforced timeout for an individual batch append to be acknowledged.

Retry Behavior

SDKs automatically retry transient failures using exponential backoff with jitter.

Append Retry Policy

Retrying appends requires care: if an append succeeds but the acknowledgement is lost (e.g., due to a network timeout), retrying would create duplicate records in a stream. The appendRetryPolicy setting controls how to react in this situation, by treating append retries as a special case. Using noSideEffects means that, in the event of a failure, the caller will manually need to verify whether or not the append succeeded (e.g., by reading or otherwise inspecting the state of the stream).
To write exactly-once in single-writer setups, append with a matchSeqNum precondition. See concurrency control for details.For multi-writer setups, include dedupe metadata such as a writer ID and per-writer idempotency key, then deduplicate later. This is touched upon in this blog post.

Configuration Reference

Timeout Settings

Retry Settings