Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.057 X-Spam-Evidence: '*H*': 0.89; '*S*': 0.00; '(using': 0.07; 'handful': 0.09; 'http': 0.09; 'recommends': 0.09; 'rfc': 0.09; 'subject:How': 0.10; 'suggest': 0.14; '"right"': 0.16; 'exists,': 0.16; 'googling': 0.16; 'limiting': 0.16; 'seconds.': 0.16; 'subject:limit': 0.16; 'elements': 0.16; 'wrote:': 0.18; 'do.': 0.18; 'settings': 0.22; 'load': 0.23; 'browsers': 0.24; 'instead.': 0.24; 'of.': 0.24; 'ssl': 0.24; 'fine': 0.24; 'header': 0.24; 'server.': 0.24; "haven't": 0.24; "i've": 0.25; 'second': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'page.': 0.31; 'requests': 0.31; 'overhead': 0.31; 'themselves': 0.32; 'open': 0.33; 'running': 0.33; 'fri,': 0.33; 'plain': 0.33; 'could': 0.34; 'connection': 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'subject:?': 0.36; 'searching': 0.37; 'server': 0.38; 'connections': 0.38; 'nov': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'even': 0.60; 'skip:u 10': 0.60; 'most': 0.60; 'tell': 0.60; 'browser': 0.61; 'simply': 0.61; 'such': 0.63; 'series': 0.66; '2-3': 0.68; '3-4': 0.68; 'default': 0.69; 'user,': 0.69; 'limit': 0.70; 'connection.': 0.74; 'hoping': 0.75; 'ideas.': 0.84; 'overlooked': 0.84; 'subject:tell': 0.84; 'edwards': 0.91; 'thing,': 0.91; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=uxHF3WQ0dA7vOLWmH6gI5nj2NIRScIHbnVy7fRntE1g=; b=QbD7zWyeLBa458enWyV+kKjjqQiXuc0zaT7Cu+Z7CoGa6QeWc0PpCT6GQcSfnBQxXR i5VC2+Vr/qgpZTMY/ff2KOvmywCR2U/UzxfqFXfj8Kl2QidqvCEU0MKYJecZIKpSKHIU jdIG9eZi9tVKasR0M29aQwhel/kF1YEdIdOQf+8TPo1cQcAdQrBtrGmpwqUnU9xwrAaS qxn/G4PPtA4gOLwhlczBWy3icJguB+6210B00hfAOM2J50YRgYZasuPOYpcKyigGxqT3 gnScAyKTjJbq7n0/XIV1fAe6NpL1kzqLwJM/ki5YCidgR++nLFUyXhirDu7GB01F5z8f oCgw== X-Received: by 10.66.141.165 with SMTP id rp5mr17729117pab.90.1383941631537; Fri, 08 Nov 2013 12:13:51 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: From: Ian Kelly Date: Fri, 8 Nov 2013 13:13:11 -0700 Subject: Re: OT: How to tell an HTTP client to limit parallel connections? To: Python Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 34 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1383941640 news.xs4all.nl 15973 [2001:888:2000:d::a6]:46474 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:58847 On Fri, Nov 8, 2013 at 10:25 AM, Grant Edwards wrote: > Yes, this off-topic, but after a fair amount of Googling and searching > in the "right" places, I'm running out of ideas. > > 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. That turns what would be a 3-4 second page load > time (using a single connection) into a 20-30 second page load time. > Even with plaintext http: connections, the multi-connection page load > time is slower than the single-connection load time, but not by as > large a factor. > > Some browsers have user-preference settings that limit the max number > of simultaneous connections to a single server (IIRC the RFCs suggest > a max of 4, but most browsers seem to default to a max of 8-16). > > What I really need is an HTTP header or meta-tag or something that I > can use to tell clients to limit themselves to a single connection. > > I haven't been able to find such a thing, but I'm hoping I've > overlooked something... No such header exists, that I'm aware of. The RFC simply recommends limiting client connections to 2 per user, but modern browsers no longer follow that recommendation and typically use 4-6 instead. Do you really need to send all the page resources over HTTPS? Perhaps you could reduce some of the SSL overhead by sending images and stylesheets over a plain HTTP connection instead.