OT: How to tell an HTTP client to limit parallel connections?

Grant Edwards invalid at invalid.invalid
Fri Nov 8 20:20:37 CET 2013


On 2013-11-08, Chris Angelico <rosuav at gmail.com> wrote:
> On Sat, Nov 9, 2013 at 4:25 AM, Grant Edwards <invalid at invalid.invalid> wrote:
>> I've got a very feeble web server.  The crypto handshaking involved in
>> opening an https: connection takes 2-3 seconds.  That would be fine if
>> a browser opened a single connection and then sent a series of
>> requests on that connection to load the various elements on a page.
>>
>> But that's not what browsers do.  They all seem to open whole handful
>> of connections (often as many as 8-10) and try to load all the page's
>> elements in parallel.
>
> Are you using HTTP 1.1 with connection reuse?

Yes.  And several years ago when I first enabled that feature in the
server, I verified that some browsers were sending multiple requests
per connection (though they still often attempted to open multiple
connections).  More recent browsers seem much more impatient and are
determined to open as many simultaneous connections as possible.

> Check that both your client(s) and your server are happy to use 1.1,
> and you may be able to cut down the number of parallel connections.

> Alternatively, since fixing it at the browser seems to be hard, can
> you do something ridiculously stupid like... tunnelling insecure HTTP
> over SSH?

Writing code to implement tunnelling via the ssh protocol is probably
out of the question (resource-wise).

If it were possible, how is that supported by browsers?

-- 
Grant Edwards               grant.b.edwards        Yow! I was making donuts
                                  at               and now I'm on a bus!
                              gmail.com            



More information about the Python-list mailing list