Generated Reqwest clients should use a shorter idle connection pool timeout
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Rust
- Star
- 1k
- Fork
- 142
- Merge trung bình
- 19 giờ 13 phút
- Pull request đã merge (30 ngày)
- 16
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của oxidecomputer/progenitor
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
oxidecomputer/progenitor#1345 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Generated client treats a declared 304 Not Modified as UnexpectedResponseCó thể đã có người làm @jjant đã nhận 6 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
oxidecomputer/progenitor#1462 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 58/100
oxidecomputer/progenitor#1457 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
oxidecomputer/progenitor#1382 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
oxidecomputer/progenitor#1318 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của oxidecomputer/progenitor
Issue tương tự
-
[Bug]: Add Data's question says "Link to the file" for a GeoPackage where small tables are copiedĐang mởunconfirmed possible issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
jerney-nexus/epikrise#364 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Yeachan-Heo/gajae-code#8058 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug daemon
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày