dnsdist: Change the default max number of queued TCP conns to 1000 #4596

Merged
merged 2 commits into from Oct 26, 2016

Projects

None yet

1 participant

@rgacogne
Member

With the existing default value of 0, we could consume an unlimited
number of file descriptors if the queued connections kept piling up.

@rgacogne rgacogne added the dnsdist label Oct 20, 2016
@rgacogne rgacogne added this to the dnsdist-1.1.0 milestone Oct 20, 2016
@rgacogne
Member

I will check more carefully but it looks like there is a mistake in the way the maximum number of file descriptors is computed:
requiredFDsCount += (tcpBindsCount * g_maxTCPQueuedConnections);
should probably be:
requiredFDsCount += g_maxTCPQueuedConnections;

And dnsdist warns when the current FD limit is less than 4/3 of the maximum FD usage, since some FD can't be accurately predicted, like web and console connections. That formula doesn't work too well for large FD counts, I'm afraid.

rgacogne added some commits Oct 20, 2016
@rgacogne rgacogne dnsdist: Change the default max number of queued TCP conns to 1000
With the existing default value of 0, we could consume an unlimited
number of file descriptors if the queued connections kept piling up.
254d7e4
@rgacogne rgacogne dnsdist: Fix potential FD usage count, only warn if limit <= potential 9fcd6ad
@rgacogne rgacogne merged commit 01cfcb9 into PowerDNS:master Oct 26, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@rgacogne rgacogne deleted the rgacogne:dnsdist-default-ma-tcp-queued-conns branch Oct 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment