Skip to content

flush pingora stream immediately#1

Open
molocule wants to merge 1 commit intomainfrom
flush-stream-immediately
Open

flush pingora stream immediately#1
molocule wants to merge 1 commit intomainfrom
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 changed the title Update server.rs flush pingora stream immediately Apr 24, 2026
@molocule molocule requested a review from gongy April 24, 2026 01:11
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