Skip to content

feat(rest): align HTTP retries and timeouts with Java - #1060

Draft
zhjwpku wants to merge 1 commit into
apache:mainfrom
zhjwpku:rest-http-client-transport
Draft

zhjwpku wants to merge 1 commit into
apache:mainfrom
zhjwpku:rest-http-client-transport

Conversation

@zhjwpku

@zhjwpku zhjwpku commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

Configure REST transport through rest.client.* properties for connection and socket timeouts, retry limits, user-agent and idempotency-key lifetime. Apply initial and merged catalog properties through the client factory, preserving custom factories and the existing timeout constructor.

Use Java's three-minute default connection timeout and zero-value timeout semantics. Enforce response inactivity deadlines in milliseconds with a synchronous libcurl transfer loop, without an additional executor.

Authenticate once and replay the same request across retries. Decide HTTP status retries after headers and before reading the entity. Honor Idempotency-Key for retry-safe requests and bound keyed retries by the first-send time and maximum next interval, including Retry-After or jitter. Parse key lifetimes as ISO-8601 durations with Java-compatible handling of invalid and non-positive values.

Retry eligible request-execution I/O failures without a delay. Propagate final response-body failures without replaying the request. Preserve redirect protection, transfer-error reporting and commit-state-unknown handling. Saturate oversized Retry-After conversions without overflow and avoid echoing malformed OAuth token responses.

Document the transport policy and add regression coverage for retry rules, key lifetime budgets, stable authentication, timeout precision and duration boundaries.

Configure REST transport through rest.client.* properties for connection
and socket timeouts, retry limits, user-agent and idempotency-key lifetime.
Apply initial and merged catalog properties through the client factory,
preserving custom factories and the existing timeout constructor.

Use Java's three-minute default connection timeout and zero-value timeout
semantics. Enforce response inactivity deadlines in milliseconds with a
synchronous libcurl transfer loop, without an additional executor.

Authenticate once and replay the same request across retries. Decide HTTP
status retries after headers and before reading the entity. Honor
Idempotency-Key for retry-safe requests and bound keyed retries by the
first-send time and maximum next interval, including Retry-After or jitter.
Parse key lifetimes as ISO-8601 durations with Java-compatible handling of
invalid and non-positive values.

Retry eligible request-execution I/O failures without a delay. Propagate
final response-body failures without replaying the request. Preserve
redirect protection, transfer-error reporting and commit-state-unknown
handling. Saturate oversized Retry-After conversions without overflow and
avoid echoing malformed OAuth token responses.

Document the transport policy and add regression coverage for retry rules,
key lifetime budgets, stable authentication, timeout precision and duration
boundaries.
@zhjwpku
zhjwpku force-pushed the rest-http-client-transport branch from bfa6d3f to c6b2a80 Compare October 25, 2026 08:22

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant