OT: limit number of connections from browser to my server?

Grant Edwards grant.b.edwards at gmail.com
Mon May 16 15:28:43 EDT 2016


On 2016-05-16, Steven D'Aprano <steve at pearwood.info> wrote:
> On Tue, 17 May 2016 02:06 am, Grant Edwards wrote:
>
>> This is not Python specific, though I'm turning to Python to do some
>> experimentation and to try to prototype a solution.
>> 
>> Is there any way to limit the number of connections a browser uses to
>> download a web page?
>
> Well, you control the server. It's your own server, right? Can you
> not tell the server to limit how many connections it accepts from
> any one client?

Definitely.

> That's not a rhetorical question -- I don't know the answer, and I
> know nothing about HTTPS server. But I would imagine that they don't
> allow unlimited connections from each client. Can you tell your
> server to only allow N connections from each client, where N is
> small enough?

Yep, I should be able to do that.  I can even reduce it to a simpler
case of only allowing N connections total.  Saying we only support one
browser session at a time is probably acceptable if it solves the long
https page load times.

Before I go to the effort of hacking up the server to change how/when
it accepts connections[1], I want to try prototyping something like
that Python to make sure that refusing or stalling a "parallel"
connection won't cause the browser to throw up its hands and tell the
user "this page can't be loaded."

[1] We didn't write the server.  We licensed source from somebody
    yonks ago.  It was then abaondoned and maintined by us and by
    applying patches we got from other users in our situation.

-- 
Grant Edwards               grant.b.edwards        Yow! I'm RELIGIOUS!!
                                  at               I love a man with
                              gmail.com            a HAIRPIECE!!  Equip me
                                                   with MISSILES!!




More information about the Python-list mailing list