Skip to content

flush pingora stream immediately#870

Closed
molocule wants to merge 1 commit into
cloudflare:mainfrom
modal-labs:flush-stream-immediately
Closed

flush pingora stream immediately#870
molocule wants to merge 1 commit into
cloudflare:mainfrom
modal-labs:flush-stream-immediately

Conversation

@molocule

Copy link
Copy Markdown

currently when sending wss requests through pingora, the rtt of a connection lifecycle + sending/receiving a request is ~1300ms compared to baseline ~300ms wss requests through caddy. The additional 1000ms comes from the websocket close handshake (which sends a close frame and waits for server's close frame reply). this exclusively happens in pingora. This takes 1s because the close frame gets buffered until tcp connection timeout. Caddy doesn't have this issue because it flushes immediately for proxied websocket data.

image

this patch fixes the issue by flushing wss requests immediately:
image

@molocule molocule closed this Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant