Skip to content

fix: set TCP_NODELAY on backend connections#26

Closed
KA-ROM wants to merge 2 commits into
mainfrom
fix/authrpc-tcp-nodelay
Closed

fix: set TCP_NODELAY on backend connections#26
KA-ROM wants to merge 2 commits into
mainfrom
fix/authrpc-tcp-nodelay

Conversation

@KA-ROM
Copy link
Copy Markdown

@KA-ROM KA-ROM commented Jun 4, 2026

Summary

awc::Connector defaults to leaving Nagle's algorithm on for the backend TCP stream. Combined with Linux's TCP_DELACK_MIN=40ms, this produced a ~40ms tail on small/asymmetric request-response pairs to op-rbuilder. This is most visible on engine_newPayloadV4 (large request, small response), where the terminating chunked frame or final small write would sit in the kernel's send buffer until the delayed-ACK timer fired.

Changes

  • Build the inner TCP connector manually (actix_tls::connect::Connector::new(...)) and .map over it to call set_nodelay(true) on each new TcpStream before handing it to awc's higher-level connector.
  • All other connector behavior (keep-alive, pool limit, TLS wrapping) is preserved.

@KA-ROM KA-ROM marked this pull request as draft June 4, 2026 08:50
@KA-ROM KA-ROM changed the title Set TCP_NODELAY on backend connections fix: set TCP_NODELAY on backend connections Jun 5, 2026
@KA-ROM KA-ROM marked this pull request as ready for review June 5, 2026 12:28
@KA-ROM KA-ROM requested a review from 0x416e746f6e June 5, 2026 12:28
@KA-ROM
Copy link
Copy Markdown
Author

KA-ROM commented Jun 5, 2026

Superseded by #27 (TCP_NODELAY commit included there as 098c7d5).

@KA-ROM KA-ROM closed this Jun 5, 2026
@KA-ROM KA-ROM deleted the fix/authrpc-tcp-nodelay branch June 5, 2026 20:14
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