New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnsdist did not set TCP_NODELAY, causing needless latency #7030

Merged
merged 2 commits into from Oct 5, 2018

Conversation

Projects
None yet
3 participants
@ahupowerdns
Member

ahupowerdns commented Oct 5, 2018

Winfried and others noted that our TLS responses were super slow. This turned out to be caused by the Nagle
algorithm which we failed to disable. https://en.wikipedia.org/wiki/Nagle%27s_algorithm

Short description

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)
  • checked that this code was merged to master
dnsdist did not set TCP_NODELAY, causing needless latency
Winfried and others noted that our TLS responses were super slow. This turned out to be caused by the Nagle
algorithm which we failed to disable. https://en.wikipedia.org/wiki/Nagle%27s_algorithm
@@ -715,7 +716,7 @@ void* tcpAcceptorThread(void* p)
continue;
}
#endif
SSetsockopt(ci->fd, SOL_TCP, TCP_NODELAY, 1); // disable NAGLE

This comment has been minimized.

@rgacogne

rgacogne Oct 5, 2018

Member

Just a nit but we have a nice setTCPNoDelay() function in misc.hh :-) It also uses IPPROTO_TCP instead of SOL_TCP, which is more portable.

@rgacogne rgacogne added this to the dnsdist-1.3.x milestone Oct 5, 2018

@pieterlexis pieterlexis merged commit b287cd3 into PowerDNS:master Oct 5, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment