Skip to content

feat(tcp): add with_nodelay() to TcpConnector#71

Merged
louisponet merged 1 commit intomainfrom
lopo/configurable-nodelay
Apr 2, 2026
Merged

feat(tcp): add with_nodelay() to TcpConnector#71
louisponet merged 1 commit intomainfrom
lopo/configurable-nodelay

Conversation

@louisponet
Copy link
Copy Markdown
Contributor

@louisponet louisponet commented Apr 2, 2026

TCP_NODELAY was unconditionally set to true on all sockets (outbound connect, reconnect, inbound accept). This adds a configurable nodelay flag (default true, no behavior change) so callers can opt into Nagle coalescing for bulk throughput workloads.

// Disable nodelay (enable Nagle coalescing)
TcpConnector::default().with_nodelay(false)

All three call sites (outbound try_connect, and two inbound accept paths in poll_with) respect the flag.


Open with Devin

@louisponet louisponet requested a review from a team April 2, 2026 16:52
devin-ai-integration[bot]

This comment was marked as resolved.

TCP_NODELAY was unconditionally set to true on all sockets (outbound,
reconnect, inbound accept). Add a configurable nodelay flag (default
true) so callers can opt into Nagle coalescing for bulk throughput
workloads where ~40ms latency is acceptable.

Usage: TcpConnector::default().with_nodelay(false)
@louisponet louisponet force-pushed the lopo/configurable-nodelay branch from 9fdaf00 to 76c3641 Compare April 2, 2026 16:56
@louisponet louisponet merged commit ef66082 into main Apr 2, 2026
1 of 2 checks passed
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.

2 participants