Answer the question
In order to leave comments, you need to log in
Number of concurrent server connections?
Wrote a simple SMTP server in python (it doesn't matter), through the library
socket, later I came across an article on Habré https://habrahabr.ru/post/123154/ I had one difficult (for me) question: how do servers support a huge number of simultaneous connections (tcp) if the number of sockets is limited? (65535)
Answer the question
In order to leave comments, you need to log in
it is not the number of sockets that is limited, but the number of own ports per IP
do not confuse outgoing connections with incoming
ones, when outgoing connections are "consumed" localIP:localPort pairs,
while incoming there is always one localIP:localPort pair
Создается несколько IP адресов. Можно даже на той же самой сетевушке несколько интерфейсов. На каждом по 65534 сокетов.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question