Skip to content

Set TCP_NODELAY on accepted connections - #391

Merged
taylorotwell merged 2 commits into
laravel:0.xfrom
drevantonder:set-tcp-nodelay
Dec 1, 2026
Merged

taylorotwell merged 2 commits into
laravel:0.xfrom
drevantonder:set-tcp-nodelay

Conversation

@drevantonder

Copy link
Copy Markdown
Contributor

Fixes #390.

The server's listener never set TCP_NODELAY, so small writes such as streamed chunks waited for the client's delayed ACK (~40 ms on Linux), including a stream's first chunk. This sets it on each accepted connection in LimitedListener::accept, the same way Reverb's listener does.

Tests: accepted_connections_have_nodelay_set accepts a connection through LimitedListener and checks the flag. It fails without the change.

@taylorotwell
taylorotwell merged commit 7e39603 into laravel:0.x Dec 1, 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.

HTTP server doesn't set TCP_NODELAY, adding ~40 ms to streamed responses

2 participants