aboutsummaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
10 daysexpose getters for cache and hit spansbleeper-yuchen-fc39bb0c3d35fa5e07c21c261c2a5a68af53d440Matthew Gumport
10 daysMake cache eviction asyncEdward Wang
This prevents eviction from affecting the time to finish the request. Also adds a Display impl for CompactCacheKey.
2024-11-18Add the ability to trigger forced-miss behavior from the `cache_hit_filter` ↵Kevin Guthrie
function
2024-11-16Improve support for sending custom response headers and bodies for error ↵Andrew Hauck
messages
2024-11-22Release cache lock after proxy upstream filter, serve staleEdward Wang
The cache locks may be held after serving stale, proxy upstream filter, or revalidate uncacheable resulting in dangling cache locks. Also only disable cache on final error if cache was not already disabled, and add DeclinedToUpstream / UpstreamError no cache reasons.
2024-11-22update `impl<T> UniqueID` to use correct return typeGeorg Lauterbach
Includes-commit: d26d344e15bd411dd298b32ecc3e60ac233b0866 Replicated-from: https://github.com/cloudflare/pingora/pull/471 Co-authored-by: Matthew Gumport <[email protected]>
2024-11-22Don't parse CachePut payloads as chunked encodingEdward Wang
The PUT request body itself may be chunked, but normally clients send the body that ought to be cached without chunked encoding applied.
2024-11-22Only cache GET response after bypassEdward Wang
After a request is predicted uncacheable and bypasses cache, it may still be cached if the response is a 200. However, HEAD responses are not normally cacheable as they don't include the actual response body.
2024-11-22Prune unused deps and run cargo-machete in ciIvan Babrou
Includes-commit: 7cee7a7e368a6e445903af1d59d92c680948ed2b Replicated-from: https://github.com/cloudflare/pingora/pull/454
2024-11-22Check content-length on end of stream h2 headerEdward Wang
The h2 crate does not appear to check for content-length underflow if only a header frame is received with END_STREAM.
2024-11-08if-range support for cache rangesEdward Wang
2024-11-08Fix cache meta trace tagsEdward Wang
Currently the meta is attempted to be logged in a hit span that may or may not exist (or has not started) depending on the cache phase.
2024-11-08Allow errors from upstream_response_body_filterEdward Wang
2024-11-08add builder api for pingora listeners:Noah Kennedy
This change takes the existing API for ListenerEndpoint and modifies it to use a typical idiomatic builder style. There are additional improvements which I feel can be made here, but I believe that it would be better to do them in subsequent commits in order to keep changes as incremental as possible. In particular, I think that making socket options into sub-builder is probably a good move.
2024-11-08Remove unused `matches=0.1` dependency crateXiaobo Liu
The rust 2021 use rust version is 1.56.0, `matches` included in the standard library prelude and thus is automatically in scope. Includes-commit: ebc6cbfd1039273c2b9620bd4c70a395afccfc3a Replicated-from: https://github.com/cloudflare/pingora/pull/414 Signed-off-by: Xiaobo Liu <[email protected]>
2024-11-08Check h2 stream end for errorEdward Wang
Certain APIs consuming HTTPTasks want to know if the response has finished. However, in cases such as protocol errors the h2 RecvStream will return `is_end_stream` which may be associated with an HTTPTask that was not actually the end of stream. This affects systems such as caching which wants to know when the response has properly finished for finishing a cache miss. This change attempts to check if the stream has ended due to an h2 error or not to forward a successful or Failed HTTPTask as appropriate.
2024-11-01Update 0.4.0 CHANGELOGYuchen Wu
2024-11-01Release 0.4.00.4.0Yuchen Wu
2024-11-01Update Readme to reflect rustls and WindowsYuchen Wu
2024-11-01add support for removing items from pingora-memory-cacheZaidoon Abd Al Hadi
2024-11-01Use OkOrErr on connect() + accept() when stream doesn't existAndrew Hauck
2024-10-31fix audit workflowFredrik Enestad
2024-10-28feat/remove-keys-from-tiny-ufoAyodeji Akinola
Includes-commit: ac601366bd02f97c132e0c1e762e17a9c962b9a6 Includes-commit: f8f456ae72db0f78aa5823f5e4121322ecbb9816 Replicated-from: https://github.com/cloudflare/pingora/pull/442 Co-authored-by: Matthew Gumport <[email protected]>
2024-10-28Move the cache-lock timing data into a digest that is not cleared when the ↵Kevin Guthrie
inner cache meta is dropped
2024-10-28allow stale in cache_vary_lookupGustav Davidsson
2024-10-28change `CachePut::cacheable` to own `ResponseHeader`Matthew Gumport
This changes the `CachePut` trait to take ownership of the response header. We have a use-case for mutating the headers as we process the response, and we would like to avoid copying them in order to do so.
2024-10-28Rust 1.82Yuchen Wu
2024-10-28tag subrequests as suchMatthew Gumport
This adds a hook during the flow where we move the write permit around for subrequests to refresh stale assets to tag the parent span as being part of a subrequest.
2024-10-28Fix clippy lint for leaking private type in rustlsKevin Guthrie
2024-10-28Change `new_with_opt_and_conf` to accept `impl Into<Option<Opt>>` instead of ↵Kevin Guthrie
explicit option
2024-10-28Make opt optional for frontendsMatt Fleming
Allow frontends to avoid jumping through hoops to create an Opt object, for example, when configuration is handled by a config file. Includes-commit: 8204820b217b6d60906b8361d2e077ed743b970b Replicated-from: https://github.com/cloudflare/pingora/pull/390
2024-10-28Update quickstart to support Opt::parse_argsTim Upthegrove
The current quickstart document suggests to use pingora v0.1, but it also suggests using the Opt::parse_args interface, which was introduced in release v0.3.0. Update the quickstart document to suggest using v0.3 when setting up the cargo.toml file. Addresses #432 Includes-commit: 9153a8a984d2e81304f8b7d6d338f1bfa126e5c3 Replicated-from: https://github.com/cloudflare/pingora/pull/433
2024-10-28Plumb errors through rustls implementationKevin Guthrie
2024-10-28Add preliminary rustls supportKevin Guthrie
Co-authored-by: Harald Gutmann <[email protected]>
2024-10-28pingora-core: Update socket dependencySargun Dhillon
We have the socket version at 0, which matches 0.3 as well. That wont work because it doesn't have feature "all". We need 0.4+. >=0.4, <1, should match ^0, but exclude 0.3. Includes-commit: 98debd9f2793a77047caebf2e70684eb7ef4df14 Replicated-from: https://github.com/cloudflare/pingora/pull/413
2024-10-28Apply response_body_filter when serving from cacheEdward Wang
Previously the response header filter was applied when serving from cache (using `proxy_cache_hit`), but not the response body filter.
2024-10-28shutdown h2 connection gracefully with GOAWAYsJordan Wu
Co-authored-by: Matthew Gumport <[email protected]> Includes-commit: 15e5c64ce46da5e061f2c84ce45cdddedf2f6058 Replicated-from: https://github.com/cloudflare/pingora/pull/415
2024-10-18Upgrade Rust to 1.82Yuchen Wu
2024-10-18Upgrade the latest Rust to 1.81Yuchen Wu
2024-10-18windows: fixes for building pingora-coreFredrik Enestad
Includes-commit: 5b5f2aeecf459f633b5459fffba4ad66da495a0a Replicated-from: https://github.com/cloudflare/pingora/pull/429
2024-10-18Auto snake case set-cookie headerYuchen Wu
For consistency when proxying h2 traffic to h1.
2024-10-18Add into_inner() for HTTP client and serverSargun Dhillon
This adds the into_inner() function to the stream type, allowing the HTTP/1.1 client and server to be turned back into a stream. These functions are useful for implementing HTTP CONNECT or HTTP Upgrade. Includes-commit: 95aa77098cdfc7667074f2793cd326f496da66a1 Replicated-from: https://github.com/cloudflare/pingora/pull/412
2024-10-18Check the current advertised h2 max streamsYuchen Wu
This change fixes an issue that the actual current max send streams is ignored. This change requires h2 >= 0.4.6
2024-10-18Guard against excess cache put response body payloadsEdward Wang
Previously clients to the cache put interface writing excess response body payloads (or bodies for responses that shouldn't have bodies) could trigger a panic in the body parser. This change opts to just drain these excess payloads without writing the excess body into cache.
2024-10-12NOJIRA Update documentation to reflect changes in featuresKevin Guthrie
2024-10-12Refactor openssl code one more time before rustls integrationYuchen Wu
Co-authored-by: Harald Gutmann <[email protected]>
2024-10-11document request_body_filterspacewander
Includes-commit: cd6f77726b2a5ca57f885af360de2ad0de788e87 Replicated-from: https://github.com/cloudflare/pingora/pull/402 Signed-off-by: spacewander <[email protected]>
2024-10-11Don't reuse session when downstream errors during cache missEdward Wang
When a downstream error occurs while a cache miss is being served, the downstream error is ignored so the upstream can continue writing to the cache. However, it is not safe to try reusing the server session in this case.
2024-10-11Detect h2 preface for h2c requests.Yuchen Wu
This allows h2c and http1 to co-exist on the same port.
2024-10-11Add windows compatibility for get_original_dest()Andrew Hauck