
On Wed, Dec 11, 2019 at 11:52 PM Antoine Pitrou <solipsis@pitrou.net> wrote:
On Mon, 9 Dec 2019 21:42:36 -0500 Kyle Stanley <aeros167@gmail.com> 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 -- python-dev@python.org To unsubscribe send an email to python-dev-leave@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/O3ZODXHE... Code of Conduct: http://python.org/psf/codeofconduct/
-- Thanks, Andrew Svetlov