On Wed, Dec 11, 2019 at 11:52 PM Antoine Pitrou <[email protected]> wrote: > > On Mon, 9 Dec 2019 21:42:36 -0500 > Kyle Stanley <[email protected]> wrote: > > > > > There's also a practical use case for having a large number of coroutine > > objects, such as for asynchronously: > > > > 1) Handling a large number of concurrent clients on a continuously running > > web server that receives a significant amount of traffic. > > Not sure how that works? Each client has an accepted socket, which is > bound to a local port number, and there are 65536 TCP port numbers > available. Unless you're using 15+ coroutines per client, you probably > won't reach 1M coroutines that way. >
I'm sorry, but the accepted socket has the same local port number as the listening one. Routing is performed by (local_ip, local_port, remote_ip, remote_port) quad. The listening socket can accept hundreds of thousands of concurrent client connections. The only thing that should be tuned for this is increasing the limit of file descriptors. > _______________________________________________ > Python-Dev mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/python-dev.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/O3ZODXHEIJ2SM5SZBOVJ4PIAQMSYNXEJ/ > Code of Conduct: http://python.org/psf/codeofconduct/ -- Thanks, Andrew Svetlov _______________________________________________ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/ZVTAHRNWGI4ESWRT44PG3JUJLWJBYXFT/ Code of Conduct: http://python.org/psf/codeofconduct/
