Skip to content

enable TCP_NODELAY on pglite server sockets - #11417

Merged
aalej merged 2 commits into
mainfrom
aalej_11402
Nov 4, 2026
Merged

aalej merged 2 commits into
mainfrom
aalej_11402

Conversation

@aalej

@aalej aalej commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

fixes #11402

Scenarios Tested

test that queries still work - ok
test that mutations still work - ok
verified that the request now take less than ~100ms on average - ok
from

--- average call trip duration
- real:0.1233
- user:0.0254
- sys:0.0116

to

--- average call trip duration
- real:0.0409
- user:0.0261
- sys:0.0114

see https://github.com/aalej/issues-11402 for testing

Sample Commands

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses high query latency on Linux in the Data Connect PGlite emulator by enabling TCP_NODELAY on sockets. Specifically, it calls socket.setNoDelay(true) inside fromNodeSocket in pgliteServer.ts to disable Nagle's algorithm, and documents this fix in CHANGELOG.md. There are no review comments, so I have no feedback to provide.

@aalej
aalej requested review from joehan and yuchenshi November 3, 2026 20:10
@aalej
aalej merged commit b36c23e into main Nov 4, 2026
51 checks passed
@aalej
aalej deleted the aalej_11402 branch November 4, 2026 12:42
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.

Data Connect emulator: PGlite server never sets TCP_NODELAY, so each query costs ~100 ms on Linux (Nagle + delayed ACK)

2 participants