Y
Y
yourisus2016-10-04 13:21:27
linux
yourisus, 2016-10-04 13:21:27

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

3 answer(s)
V
Vladimir, 2016-10-04
@yourisus

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

S
Saboteur, 2016-10-04
@saboteur_kiev

Создается несколько IP адресов. Можно даже на той же самой сетевушке несколько интерфейсов. На каждом по 65534 сокетов.

R
romy4, 2016-10-04
@romy4

Там же в комментариях и есть разъяснение "как такое возможно".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question