[130782] in North American Network Operators' Group
Re: How to have open more than 65k concurrent connections?
daemon@ATHENA.MIT.EDU (Phil Regnauld)
Thu Oct 14 12:41:29 2010
Date: Thu, 14 Oct 2010 18:41:10 +0200
From: Phil Regnauld <regnauld@nsrc.org>
To: Jorge Amodio <jmamodio@gmail.com>
In-Reply-To: <AANLkTinBVr1mW3ngNO+hftd8nqKaQw+K7_2Kk57MAaZg@mail.gmail.com>
Cc: nanog@nanog.org
Errors-To: nanog-bounces+nanog.discuss=bloom-picayune.mit.edu@nanog.org
Jorge Amodio (jmamodio) writes:
> you have only 16-bits for port numbers.
65k port numbers != number of connections.
The number of open connections (if we're talking TCP) is
limited by the number of max file descriptors in the kernel
(fs.file_max).
See also:
http://www.network-builders.com/maximum-simultaneous-network-connections-t56317.html
You could have hundreds of thousands of connections to
the same (destination IP, destination port).
In practice, there are other limitations:
http://www.kegel.com/c10k.html is good reading, even though
it is a few years old.