Path: csiph.com!usenet.pasdenom.info!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!Xl.tags.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.supernews.com!news.supernews.com.POSTED!not-for-mail NNTP-Posting-Date: Tue, 28 Jul 2015 02:32:48 -0500 Newsgroups: comp.os.linux.networking Subject: Re: number of simultaneous tcp/ip connections on 32 bit linux References: From: floyd@apaflo.com (Floyd L. Davidson) Organization: __________ Date: Mon, 27 Jul 2015 23:32:42 -0800 Message-ID: <87r3nspwit.fld@barrow.com> User-Agent: gnus 5.10.6/XEmacs 21.4.15/Linux 2.6.19 Cancel-Lock: sha1:LYkbCijuxDstHSmoJZQ965i1VQw= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Lines: 49 X-Trace: sv3-ipmQ/fzyidES5g/CXyJ91H3VHpRJpquCxG2BIpjYAQjz3I33Zwv1nRyEdSPUZeAQSwuaIKdrvmJ6Oj9!4EwttGLr465qayFkzX8vnuz1qjA8C2H6WnqcXPO/kjE33rfTa24kbLaG9USCXw== X-Complaints-To: www.supernews.com/docs/abuse.html X-DMCA-Complaints-To: www.supernews.com/docs/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 3172 Xref: csiph.com comp.os.linux.networking:3427 Bob Martin wrote: >in 503286 20150727 231134 Richard Kettlewell wrote: >>g918273l@gmail.com writes: >>> I have a specific question on implementing a load balancer or a TCP/IP >>> server program that does TCP/IP. >>> >>> Since port number is 16 bits, there are a max of only 65536 ports on a >>> single Linux box at any given time. >>> And TCP/IP needs a port number to talk to the outside world. >>> 1) when a client establishes a connection, an ephemeral port number is chosen. >>> 2) when a server listening on a socket accepts a connection, a port >>> number is assigned. >>> >>> So in my understanding at any given time only maximum 65536 TCP/IP >>> connections can exist on a given machine. >> >>A TCP connection is identified by the source address, source port, >>destination address and destination port. Lots more than 65536 >>possibilities. >> >>-- >>http://www.greenend.org.uk/rjk/ > >True, but it doesn't answer the OP's question. Certainly it does... The port number only specifies the specific server program that will respond to requests on a given machine. There might be many thousands of connections to that one program, on that one port. Consider for example that port 80 is normally assigned to the HTTP server, and there are commonly hundreds or thousands of browsers connected to many of the busier web servers. In addition to just that one port, the same machine might also have server programs listening to dozens of other ports at the same time. There might be thousands of TCP/IP connections to each of several different ports. FTP, HTTP, HTTPS, SMTP, SSH, NTTP, POP3, and many others. The 16 bit size of the port number only limits the number of services, handled by that many different server programs. -- Floyd L. Davidson http://www.apaflo.com/ Ukpeagvik (Barrow, Alaska) floyd@apaflo.com