Generated Reqwest clients should use a shorter idle connection pool timeout
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Rust
- Stelle
- 1k
- Fork
- 142
- Merge medio
- 19h 13m
- PR unite (30g)
- 16
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di oxidecomputer/progenitor
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
oxidecomputer/progenitor#1345 ·
I maintainer di solito rispondono entro 1 giorno
-
Generated client treats a declared 304 Not Modified as UnexpectedResponseForse già presa @jjant l’ha presa 6 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
oxidecomputer/progenitor#1462 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 58/100
oxidecomputer/progenitor#1457 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
oxidecomputer/progenitor#1382 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
oxidecomputer/progenitor#1318 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di oxidecomputer/progenitor
Issue simili
-
[Bug]: Add Data's question says "Link to the file" for a GeoPackage where small tables are copiedApertaunconfirmed possible issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
jerney-nexus/epikrise#364 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Yeachan-Heo/gajae-code#8058 ·
I maintainer di solito rispondono entro 1 giorno
-
bug daemon
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno