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
enable connection pooling and reuse for outbound wasi-http (#3229)
* enable connection pooling and reuse for outbound wasi-http
This updates `factor-outbound-http/wasi.rs` to use
`hyper_util::client::legacy::Client`, which does connection pooling by default.
`Client` requires a `tower_service::Service` implementation for creating new
connections, which in turn required moving code around to accomodate a different
flow of control. It also forces us to work at a slightly higher level of
abstraction, so we don't have as much fine-grained control as before, notably:
- We can't make HTTP/2-specific request tweaks like we did before (e.g. removing
or adding `host` headers, or tweaking the path-with-query). I'm mainly
leaving it up to `hyper-util` to do the right thing here :crossed_fingers:.
- We can't provide an `AbortOnDropJoinHandle` when constructing an
`IncomingResponse` object, which may mean the connection continues to exist
after the response is dropped, but that's kind of the point of connection
pooling anyway.
Open questions: do we want to make this configurable, and if so, should it be
enabled or disabled by default?
Signed-off-by: Joel Dice <[email protected]>
* make outbound HTTP connection pooling runtime-configurable
It's enabled by default, but can be disabled via a runtime config file
containing:
```toml
[outbound_http]
connection_pooling = false
```
Signed-off-by: Joel Dice <[email protected]>
* use pinned Rust version for `all-integration-tests`
This will hopefully fix CI :crossed_fingers:
Signed-off-by: Joel Dice <[email protected]>
---------
Signed-off-by: Joel Dice <[email protected]>
0 commit comments