Although it is implied that fail_to_connect() errors are already caused
by upstream connections, it is more clear for the user's code inside this callback
by marking the error source in this case.
I started fidgeting with another one of the tests breaking because of the
estimator not being deterministic, and then decided to do this another way.
This adds `seeded` and `seeded_compact` constructors to the estimator which are
used in tests to override the LFU. These are hidden behind `cfg(test)`. The
`random_status` field of the UFO object is also overridden with the same seeds
as used for the seeded LFU.
These make the tests pass consistently without requiring further monkeying.
Now UDS can be parsed from string with prefix "unix:". The raw path
support will be deprecated.
From https://github.com/cloudflare/pingora/pull/141
Co-authored-by: blackanger <blackanger.z@gmail.com>
When a user calls `release_http_session` on an http Connector, it is
usually implied that they intend to reuse the underlying connection if
possible. Previously for H1 this involved reaching into the H1 client
Session and calling `respect_keepalive`. The new behavior always
respects keepalive as part of releasing the http session, as it was very
easy to overlook this step and unintentionally disable connection reuse
for H1 sessions.
Adds nightly to the toolchain list and short-circuits steps where nightly will
have extra warnings.
Also update 1.78->1.79 to track new stable release.
Fixes https://github.com/cloudflare/pingora/issues/228
This adds a function to set the compression level per supported algorithm. The
behavior of `adjust_level` is changed to set the level for all of the algorithms
such that it still behaves the same.
Previously the test would fail because the item evicted may be the entry (4,4,1)
failing admission. I adjusted the weights so that all weights for items besides
the one we want moved to the main cache are equal and the cache can only hold
three. The test then checks that 1 is moved to the main, the evicted key is
gone, and the other two are present.
Before this change, a HTTP client would only respect
the Connection header returned from the server.
Now, if the client sends "Connection: closed", it would not
keepalive regardless what the server returns.
This feature allows to plug in 3rd party extensions with minimal code
required.
The downstream compression logic is now a module.
Add: a new early_request_filter API to fine tune the behavior of the modules.
Add: a few APIs to write the response with these modules enabled. This
should address issues like compression is not applied to custom
responses.
These APIs show how much time a socket spends on waiting for data and
the time waiting for data to be sent. They are good indicators of
performance bottlenecks.