Generated Reqwest clients should use a shorter idle connection pool timeout
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by locating the generator code and tests for generated native Client::new constructors, then review the linked Dropshot discussion for context on the timeout tradeoff. Update generator tests and generated-code snapshots to verify the chosen pool_idle_timeout is emitted only for native Client::new; confirm new_with_client and wasm32 output remain unchanged, then compile generated clients. Done when those checks pass, though the appropriate default still needs a decision.
索引モデルが issue の本文から書いたものです。
説明
Problem
Progenitor-generated native clients currently construct their default reqwest::Client without configuring pool_idle_timeout, leaving Reqwest's default of 90 seconds.
This can interact poorly with HTTP servers that close idle connections sooner. For example, Dropshot's underlying Hyper server uses a nominal 30-second keep-alive timeout.
A generated client may attempt to reuse an idle connection around the time the server closes it, resulting in intermittent request failures.
This behavior is discussed in oxidecomputer/dropshot#1739.
Proposed change
Consider setting a shorter pool_idle_timeout in the generated native Client::new constructor.
A value of 15 or 20 seconds has been suggested in the Dropshot discussion. An existing workaround in the scrimlet reconcilers reportedly uses 10 seconds.
The appropriate default should balance reducing connection reuse races against the additional connection churn caused by shorter idle lifetimes.
Scope
- Apply the setting to generated native
Client::newconstructors. - Preserve
Client::new_with_client, allowing callers to supply their own Reqwest configuration. - Leave wasm32 behavior unchanged.
- Do not change request execution timeouts or public constructor signatures.
Testing
The change could be validated through generator tests and updated generated-code snapshots, followed by compilation of the generated clients.
These tests would establish that the intended configuration is emitted, but would not prove that every connection-close race is eliminated.
Open question
What default idle timeout should Progenitor use for generated native clients, considering that they may communicate with both Dropshot and non-Dropshot servers?
@davepacheco @ahl
Related: oxidecomputer/dropshot#1739
- 主要言語
- Rust
- スター
- 1k
- フォーク
- 142
- 平均マージ
- 19時間 13分
- マージ済み PR(30日)
- 16
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
oxidecomputer/progenitor のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
oxidecomputer/progenitor#1345 ·
メンテナーはふだん 1 日以内に返信
-
Generated client treats a declared 304 Not Modified as UnexpectedResponse対応中かも @jjant が 6 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
oxidecomputer/progenitor#1462 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
oxidecomputer/progenitor#1457 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
oxidecomputer/progenitor#1382 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
oxidecomputer/progenitor#1318 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
oxidecomputer/progenitor の issue をすべて見る
似ている issue
-
[Bug]: Add Data's question says "Link to the file" for a GeoPackage where small tables are copiedオープンunconfirmed possible issue
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
jerney-nexus/epikrise#364 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
Yeachan-Heo/gajae-code#8058 ·
メンテナーはふだん 1 日以内に返信
-
bug daemon
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信