You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expose per-upstream client timeouts and retries in ClientConfig (#203)
* Expose per-upstream client timeouts and retries in `ClientConfig`
`Client::new` already accepts `request_timeout`, `connection_timeout`,
and `retries` arguments, but `from_config` hardcodes all three to
`None` because `ClientConfig` only exposes `endpoints` and
`shuffle_endpoints`. As a result the only way to override the 30s
per-upstream request timeout (and the 30s connection timeout, and the
default retry count) is to construct `Client` directly in Rust, which
isn't reachable from the YAML-driven config.
Adds three optional fields to `ClientConfig`:
- `request_timeout_seconds`
- `connection_timeout_seconds`
- `retries`
`from_config` plumbs them into `Client::new`. None of the existing
defaults change when the fields are omitted.
The motivating case is heavy storage queries against slow public RPCs
(Acala under load is the case that surfaced this in
`polkadot-fellows/runtimes#1180` /
`open-web3-stack/polkadot-ecosystem-tests#621`) where 30s per upstream
is not enough and Subway exhausts its endpoint cycle without serving
a response.
* cargo fmt
* feat(bench): Add client config options for connection timeout, request timeout, and retries
---------
Co-authored-by: Bryan Chen <xlchen1291@gmail.com>
0 commit comments