Re: [python-tulip] Throttling connection limit of loop.create_server based servers

2016-10-19 Thread Justin Mayfield
https://github.com/python/asyncio/pull/448 On Tue, Oct 18, 2016 at 2:30 PM Justin Mayfield wrote: > That's interesting, I hadn't seen that method yet. I'd still like to > pursue pause/resume on Server for this use-case, but I might make use of > that in the future for more

Re: [python-tulip] Throttling connection limit of loop.create_server based servers

2016-10-18 Thread Justin Mayfield
That's interesting, I hadn't seen that method yet. I'd still like to pursue pause/resume on Server for this use-case, but I might make use of that in the future for more complex servers. JM On Tue, Oct 18, 2016 at 2:19 PM Yury Selivanov wrote: > On Oct 18, 2016, at 4:10

Re: [python-tulip] Throttling connection limit of loop.create_server based servers

2016-10-18 Thread Justin Mayfield
Re 3.6 freeze, This is understandable. I just wanted to make sure I wasn't missing something in the first place. I can submit a PR/Issue that focuses on Server.pause_serving and resume_serving if that's the most sensible place for this. A param to start_server such as `connection_limit`

Re: [python-tulip] Throttling connection limit of loop.create_server based servers

2016-10-18 Thread Justin Mayfield
HI Guido, If you're refering the the backlog param of listen(), this controls how many sockets the kernel will establish on your behalf when your accept() calls fall behind the incoming connection rate. E.g. an accept queue. There is a good write up here

Re: [python-tulip] Throttling connection limit of loop.create_server based servers

2016-10-18 Thread Guido van Rossum
Could you do this by changing listen()? On Tue, Oct 18, 2016 at 11:42 AM, Yury Selivanov wrote: > Hi, > > No, I don’t think we have an API for that. I suppose you can make a PR (or > open an issue) at github.com/python/asyncio proposing to add >

Re: [python-tulip] Throttling connection limit of loop.create_server based servers

2016-10-18 Thread Yury Selivanov
Hi, No, I don’t think we have an API for that. I suppose you can make a PR (or open an issue) at github.com/python/asyncio proposing to add `pause_serving()`/`resume_serving()`. I’m afraid we aren’t going to add them until 3.7, since Python 3.6 is in feature freeze mode now. Yury > On Oct

[python-tulip] Throttling connection limit of loop.create_server based servers

2016-10-18 Thread Justin Mayfield
Is there a public interface for controlling the connection limit on servers created with `loop.create_server`? Specifically a way to ~ `remove_reader(_accept_connection)` temporarily. I've developed a statsd proxy for a client that needs to implement backpressure all the way to the listening