Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Grant Edwards 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: References: <5739ff37$0$1605$c3e8da3$5496439d@news.astraweb.com> X-Trace: news.uni-berlin.de ad4dXe0VeMW2WBGAwNNq4wpvepPKSGm3ZHos/zI76dUg== Return-Path: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <5739ff37$0$1605$c3e8da3$5496439d@news.astraweb.com> Xref: csiph.com comp.lang.python:108688 On 2016-05-16, Steven D'Aprano 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!!