Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from cloudflare:main #1

Open
wants to merge 317 commits into
base: main
Choose a base branch
from
Open

Conversation

pull[bot]
Copy link

@pull pull bot commented Mar 7, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

eaufavor and others added 27 commits May 10, 2024 15:22
This change allows customized HTTP1 reason phrase to be used and
proxied.
Includes-commit: 069a792
Replicated-from: #209
Signed-off-by: Benjamin Leggett <[email protected]>
Allow generating custom responses to purge requests (requests to
invalidate or delete from the HTTP cache).
SO_RCVBUF needs to be set before connect otherwise tcp settings will
not be finalized correctly. And since autotuning is not engaged in this
case, the throughput will suffer.
Provide default and non_exhaustive for TcpSocketOptions to future proof
its changes.

Also fix an issue that TcpScoketOptions can't be used for IPv4 sockets
at all.
There is still a bug but change to this to help debug.
It is possible that when two threads try to release streams of the same
h2 connection, one thread would register the connection in the in_use_pool
while the other register it in the idle_pool.

The solution is to put a lock so that the connection can only appear in
one pool at a time.
---
Fixed formatting

Includes-commit: 05f9754
Includes-commit: 29286c7
Replicated-from: #239
Make it async and more natural.
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.
eaufavor and others added 30 commits January 31, 2025 15:26
These functions allow to use stale values while performing updates
in the background to minimize the lookup latency.
poll_capacity won't return if 0 capacity is requested.
This moves the call to `seek` on a file's cursor from the `HttpProxy`
state machine to the `ServeFromCache` state machine. If it is able to seek,
then the range is set to `None` so that the range filter is deactivated.
calling std::process::exit during shutdown.
---
Fix pingora-core Server formatting to pass ci check.
---
Add doc comments for ShutdownSignal
---
Remove unused mut self from run_forever
---
Add Debug derive for Shutdown signal
---
Add docs for shutdown handling

Includes-commit: 7f5c988
Includes-commit: b7ffdc5
Includes-commit: 0096b01
Includes-commit: 02c1ea1
Includes-commit: 05e0907
Includes-commit: 11881c5
Replicated-from: #493
Those names was created when the downstream only supported h1,
which is no longer the case.
Since this change response_duplex(_vec) will return true when the body
write finishes even if the end_stream flag is not set. This change makes
pingora-proxy stop polling from the downstream connection when the
response finishes already.

Before this change, in a rare case where the h2 upstream responds the
complete body according to its content-length header but end_stream is not
received yet, the h1 downstream would already consider sending the next
request over the reused connection because h1 doesn't rely on any explicit
end_stream signal when content-length is used. In this case, the next
request would cause an error.
Since the previous change that signals the downstream to finish when
body write finishes, the downstream pipe would close before the upstream
sends its final finishing HttpTask. This is not an error.
---
Update server.rs

Includes-commit: 3bfbd28
Includes-commit: f497a85
Replicated-from: #507
Also fix an issue where a new uri using set_uri may not be used if the
raw_path_fallback was also in use.
Includes-commit: 7e8b7fd
Replicated-from: #515
Prior to this, invalidations did not affect the eviction system so the
amount of available storage could be underutilized.
This allows the hit handler to tell the eviction system a weight to
initialize the asset with if it is not already registered.
Dangling cache locks could occur when there were simply many readers at
once waiting for the lock, the reason being the available permits could
immediately be used up upon unlocking and before the WritePermit is
dropped, resulting in a false positive dangling lock.

Instead, just mark the WritePermit as finished when the cache key lock
is unlocked as a result of having the permit. The most intuitive way to
do this is to "turn in" the WritePermit back to the CacheKeyLock that
created it when unlocking, so that the CacheKeyLock can mark it as
finished.
The write permit a subrequest is holding onto may be dropped if the
subrequest encounters an error. When this occurs, unlock the permit as a
transient error.
Includes-commit: 256a939
Replicated-from: #484
Signed-off-by: shyunny <[email protected]>
Allow session reuse if configured in `fail_to_proxy`. Applies only to
errors prior to proxying upstream, for now.

Previously any short-circuiting error during request processing would
result in closing the connection to downstream. This is unnecessary if
there was an internal error that simply resulted in an error response
being written downstream. Note that any `set_keepalive` on the Session
itself is still respected, and this API currently does not overwrite
reuse decisions made while proxying upstream.

The user is responsible for implications of reusing the session in this
manner, such as draining any remaining request body.
Delay it to later. This should help boosting how fast the server can accept
now connections.
Rustls only supports v4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.