Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #108688

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

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Grant Edwards <grant.b.edwards@gmail.com>
Newsgroups comp.lang.python
Subject Re: OT: limit number of connections from browser to my server?
Date Mon, 16 May 2016 19:28:43 +0000 (UTC)
Lines 42
Message-ID <mailman.30.1463426931.19823.python-list@python.org> (permalink)
References <nhcr5g$o1k$1@ger.gmane.org> <mailman.17.1463414817.19823.python-list@python.org> <5739ff37$0$1605$c3e8da3$5496439d@news.astraweb.com> <nhd71b$je7$2@ger.gmane.org>
X-Trace news.uni-berlin.de ad4dXe0VeMW2WBGAwNNq4wpvepPKSGm3ZHos/zI76dUg==
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'prototyping': 0.07; 'subject:number': 0.07; 'https': 0.09; 'page?': 0.09; 'patches': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:qwest.net': 0.09; 'situation.': 0.09; 'throw': 0.09; 'python': 0.10; '"this': 0.13; 'prototype': 0.15; 'server,': 0.15; '2016': 0.16; 'enough?': 0.16; 'equip': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'specific,': 0.16; 'subject:limit': 0.16; 'subject:server': 0.16; 'wrote:': 0.16; 'hacking': 0.18; 'solution.': 0.18; 'load': 0.20; 'saying': 0.22; 'simpler': 0.22; 'am,': 0.23; 'header:User- Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'question': 0.27; 'accepts': 0.29; "i'm": 0.30; 'connection': 0.30; 'server.': 0.30; 'that.': 0.30; 'connections': 0.30; 'somebody': 0.30; 'probably': 0.31; "can't": 0.32; '[1]': 0.32; 'source': 0.33; "d'aprano": 0.33; 'right?': 0.33; 'steven': 0.33; 'tue,': 0.34; 'server': 0.34; 'acceptable': 0.35; 'licensed': 0.35; 'something': 0.35; 'but': 0.36; 'should': 0.36; 'there': 0.36; 'to:addr:python- list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'times.': 0.38; "won't": 0.38; 'sure': 0.39; 'subject:from': 0.39; "didn't": 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'some': 0.40; 'your': 0.60; 'ago.': 0.61; 'our': 0.64; 'limit': 0.65; 'applying': 0.70; 'answer,': 0.84; 'refusing': 0.84; 'edwards': 0.91; 'hands': 0.96; 'imagine': 0.96
X-Injected-Via-Gmane http://gmane.org/
X-Gmane-NNTP-Posting-Host 67-130-15-94.dia.static.qwest.net
User-Agent slrn/1.0.2 (Linux)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.22
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <nhd71b$je7$2@ger.gmane.org>
X-Mailman-Original-References <nhcr5g$o1k$1@ger.gmane.org> <mailman.17.1463414817.19823.python-list@python.org> <5739ff37$0$1605$c3e8da3$5496439d@news.astraweb.com>
Xref csiph.com comp.lang.python:108688

Show key headers only | View raw


On 2016-05-16, Steven D'Aprano <steve@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!!

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

OT: limit number of connections from browser to my server? Grant Edwards <grant.b.edwards@gmail.com> - 2016-05-16 16:06 +0000
  Re: OT: limit number of connections from browser to my server? Steven D'Aprano <steve@pearwood.info> - 2016-05-17 03:11 +1000
    Re: OT: limit number of connections from browser to my server? Grant Edwards <grant.b.edwards@gmail.com> - 2016-05-16 19:28 +0000
    Re: OT: limit number of connections from browser to my server? Grant Edwards <grant.b.edwards@gmail.com> - 2016-05-16 22:09 +0000
      Re: OT: limit number of connections from browser to my server? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-05-17 18:06 +1200
        Re: OT: limit number of connections from browser to my server? Marko Rauhamaa <marko@pacujo.net> - 2016-05-17 09:23 +0300
          Re: OT: limit number of connections from browser to my server? Grant Edwards <grant.b.edwards@gmail.com> - 2016-05-17 14:23 +0000
        Re: OT: limit number of connections from browser to my server? Grant Edwards <grant.b.edwards@gmail.com> - 2016-05-17 14:22 +0000

csiph-web