[rabbitmq-discuss] TCP-level connection limitations (was Re: RabbitMQ cluster with potentially millions of connections)

Tony Garnock-Jones tonygarnockjones+rabbitmq at gmail.com
Mon Jan 28 17:43:37 GMT 2013

Hi Jason,

On 26 January 2013 12:14, McIntosh Jason <mcintoshj at gmail.com> wrote:

> with TCP/IP communications an interface only has 65k ports (roughly).

If my understanding is correct, this is less of a limitation than it seems.

TCP connections are identified by a quad of source-IP, source-port, dest-IP
and dest-port. So if you have a service listening on port 5672,
the connections will, on the server, look like <--> <--> <-->

and so on. In each case, the IP/port of the server's end of the socket is
the same. This means that you're not limited to 65k TCP connections per
interface; instead, you're limited to approximately 2^48
= 281,474,976,710,656 connections *per listening socket* :-)

The rest of your message is spot on, in particular regarding file
descriptor and memory limits in the operating system and C libraries.


Tony Garnock-Jones
tonygarnockjones at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130128/3dceea2d/attachment.htm>

More information about the rabbitmq-discuss mailing list