N
N
nuclear_kote2017-09-28 09:34:49
Computer networks
nuclear_kote, 2017-09-28 09:34:49

How is more than one connection per port (socket) implemented?

It means not a software implementation of sockets. And proceeding from this question: how many maximum connections can there be per port at the same time?
Just in case, we are talking about web sockets on the server side, but probably this is not important here.
There is an opinion that there can be no more than 65536 connections at the same time

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
alex_ak1, 2017-09-28
@nuclear_kote

If you connect from one computer, then yes, local sockets will be exhausted.
If from different - then there is not much difference - each connection will be from the address 1.2.3.4:5678, and these addresses will be almost infinite.
Rather, the resources of the system will be exhausted. For example , here is a discussion about increasing the number of TCP connections in the seven.

E
Eugene Wolf, 2017-09-28
@Wolfnsex

According to some participants in the discussion, there can be no more than 65536 connections
As far as I remember, there are 65536 TCP ports in total (port 0 is reserved), and I don’t remember the maximum number of connections per port, which would be limited by something (well, except for the resources of the machine). Do you understand how it all works in totality? The server stores information on each connection somewhere in the bowels of memory, while you can connect multiple times to the same port, from the same IP to the same server ...
I don’t know which side you are asking this question from more interested in theoretical or practical ... once upon a time, there was a "world-wide" problem called C10k, which was subsequently successfully solved in a number of programs, incl. Nginx (which was created, including with a direct calculation of the solution to this problem). If you go to the last link, there you can find the following phrase:
As of the mid-2010s, a mid-range server hardware node is capable of handling up to 10 million connections
, i.e. 2010, 10 million connections at the same time. I think this figure is more than enough for almost any modern and even very loaded project, besides, as you may have noticed, nothing is said about the limitations of the TCP / IP protocol, even hypothetical ones.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question