Forwarding to the list as well. ---------- Forwarded message --------- From: Morten W. Petersen <morp...@gmail.com> Date: Thu, Jul 28, 2022 at 11:22 PM Subject: Re: Simple TCP proxy To: Chris Angelico <ros...@gmail.com>
Well, an increase from 0.1 seconds to 0.2 seconds on "polling" in each thread whether or not the connection should become active doesn't seem like a big deal. And there's also some point where it is pointless to accept more connections, and where maybe remedies like accepting known good IPs, blocking IPs / IP blocks with more than 3 connections etc. should be considered. I think I'll be getting closer than most applications to an eventual ceiling for what Python can handle of threads, and that's interesting and could be beneficial for Python as well. -Morten On Thu, Jul 28, 2022 at 2:31 PM Chris Angelico <ros...@gmail.com> wrote: > On Thu, 28 Jul 2022 at 21:01, Morten W. Petersen <morp...@gmail.com> > wrote: > > > > Well, I was thinking of following the socketserver / handle layout of > code and execution, for now anyway. > > > > It wouldn't be a big deal to make them block, but another option is to > increase the sleep period 100% for every 200 waiting connections while > waiting in handle. > > Easy denial-of-service attack then. Spam connections and the queue > starts blocking hard. The sleep loop seems like a rather inefficient > way to do things. > > > Another thing is that it's nice to see Python handling 500+ threads > without problems. :) > > Yeah, well, that's not all THAT many threads, ultimately :) > > ChrisA > -- > https://mail.python.org/mailman/listinfo/python-list > -- I am https://leavingnorway.info Videos at https://www.youtube.com/user/TheBlogologue Twittering at http://twitter.com/blogologue Blogging at http://blogologue.com Playing music at https://soundcloud.com/morten-w-petersen Also playing music and podcasting here: http://www.mixcloud.com/morten-w-petersen/ On Google+ here https://plus.google.com/107781930037068750156 On Instagram at https://instagram.com/morphexx/ -- I am https://leavingnorway.info Videos at https://www.youtube.com/user/TheBlogologue Twittering at http://twitter.com/blogologue Blogging at http://blogologue.com Playing music at https://soundcloud.com/morten-w-petersen Also playing music and podcasting here: http://www.mixcloud.com/morten-w-petersen/ On Google+ here https://plus.google.com/107781930037068750156 On Instagram at https://instagram.com/morphexx/ -- https://mail.python.org/mailman/listinfo/python-list