[PR #1249] [MERGED] Set TCP_NODELAY when building a TCP connection #2127

Closed
opened 2026-03-16 06:06:31 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/1249
Author: @djc
Created: 10/15/2020
Status: Merged
Merged: 10/15/2020
Merged by: @djc

Base: mainHead: tcp-no-delay


📝 Commits (2)

  • ef9c359 centralize connection setup for Tokio TcpStream in proto
  • 6092ee5 disable Nagle's algorithm for TCP connections

📊 Changes

6 files changed (+24 additions, -10 deletions)

View changed files

📝 crates/async-std-resolver/src/net.rs (+3 -3)
📝 crates/native-tls/src/tls_stream.rs (+2 -2)
📝 crates/openssl/src/tls_stream.rs (+2 -2)
📝 crates/proto/src/tcp/mod.rs (+14 -0)
📝 crates/proto/src/tcp/tcp_client_stream.rs (+1 -1)
📝 crates/rustls/src/tls_stream.rs (+2 -2)

📄 Description

I happened to be reading this article about unexpected minimum latencies and it referenced Nagle's algorithm. Since DNS queries are sensitive to latency and DNS messages are usually smaller than the Maximum Segment Size, this seems sensible.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/1249 **Author:** [@djc](https://github.com/djc) **Created:** 10/15/2020 **Status:** ✅ Merged **Merged:** 10/15/2020 **Merged by:** [@djc](https://github.com/djc) **Base:** `main` ← **Head:** `tcp-no-delay` --- ### 📝 Commits (2) - [`ef9c359`](https://github.com/hickory-dns/hickory-dns/commit/ef9c359408d91753c8b34d2be50719483125706b) centralize connection setup for Tokio TcpStream in proto - [`6092ee5`](https://github.com/hickory-dns/hickory-dns/commit/6092ee53ba07cd6614a17848049fd4c44a977cfa) disable Nagle's algorithm for TCP connections ### 📊 Changes **6 files changed** (+24 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `crates/async-std-resolver/src/net.rs` (+3 -3) 📝 `crates/native-tls/src/tls_stream.rs` (+2 -2) 📝 `crates/openssl/src/tls_stream.rs` (+2 -2) 📝 `crates/proto/src/tcp/mod.rs` (+14 -0) 📝 `crates/proto/src/tcp/tcp_client_stream.rs` (+1 -1) 📝 `crates/rustls/src/tls_stream.rs` (+2 -2) </details> ### 📄 Description I happened to be reading [this article](https://rachelbythebay.com/w/2020/10/14/lag/) about unexpected minimum latencies and it referenced [Nagle's algorithm](https://en.wikipedia.org/wiki/Nagle%27s_algorithm). Since DNS queries are sensitive to latency and DNS messages are usually smaller than the Maximum Segment Size, this seems sensible. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 06:06:31 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#2127
No description provided.