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


Groups > comp.lang.python > #58845

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

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.032
X-Spam-Evidence '*H*': 0.94; '*S*': 0.00; 'discard': 0.07; 'hosts': 0.07; 'http': 0.09; 'newline': 0.09; 'url:localhost': 0.09; 'yeah,': 0.09; 'subject:How': 0.10; 'attempted': 0.16; 'bit.': 0.16; 'consciously': 0.16; 'downside': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'localhost': 0.16; 'locally,': 0.16; 'similarly,': 0.16; 'ssh': 0.16; 'subject:limit': 0.16; 'suggestion.': 0.16; 'url:8000': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'connects': 0.19; 'possible,': 0.19; 'server,': 0.19; 'value.': 0.19; 'seems': 0.21; 'shell': 0.22; 'browsers': 0.24; '(or': 0.24; 'question': 0.24; 'least': 0.26; 'supported': 0.26; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'host': 0.29; 'fixed': 0.29; 'chris': 0.29; 'feature': 0.29; 'am,': 0.29; 'needed.': 0.30; 'said,': 0.30; 'message-id:@mail.gmail.com': 0.30; '(which': 0.31; 'code': 0.31; 'requests': 0.31; 'that.': 0.31; 'enabled': 0.31; 'fixing': 0.31; 'such.': 0.31; 'yes.': 0.31; 'file': 0.32; 'probably': 0.32; 'run': 0.32; 'another': 0.32; 'open': 0.33; 'says': 0.33; 'everyone': 0.33; 'ago': 0.33; 'link.': 0.33; 'url:non-standard http port': 0.33; 'could': 0.34; 'connection': 0.35; 'possible.': 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'done,': 0.36; 'done': 0.36; 'subject:?': 0.36; 'implement': 0.38; 'server': 0.38; 'configured': 0.38; 'connections': 0.38; 'nov': 0.38; 'to:addr:python-list': 0.38; 'little': 0.38; 'anything': 0.39; 'recent': 0.39; 'embedded': 0.39; 'skip:8 10': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'up,': 0.60; 'tell': 0.60; 'free': 0.61; 'establish': 0.61; 'browser': 0.61; 'traffic': 0.61; 'simply': 0.61; 'first': 0.61; "you've": 0.63; 'name': 0.63; 'skip:n 10': 0.64; 'interest': 0.64; 'more': 0.64; 'between': 0.67; 'useful.': 0.68; 'default': 0.69; 'secure': 0.71; 'cut': 0.74; 'long-term': 0.74; 'effectively,': 0.84; 'insecure': 0.84; 'ridiculously': 0.84; 'subject:tell': 0.84; 'edwards': 0.91; 'encrypted': 0.91; 'tunnel': 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:date:message-id:subject:from:to :content-type; bh=REzF3xPxnB/340ryI/vqXED8mszgkfY5g98phYBcT1I=; b=jdw4WMusyZl4wQy8Dz1DMHJc39RGEA46HAqdOCLRJdvACTzCQbJ3vGcQgSN96YpwNX RDGwtEEr8w5D2LN7KuGPcybww1xqrEPIynEtd9hKFmwWWTP1kwNZ1fMbStV5tWgO3jj8 Pf1gl2qFF831SKcOxRP+IddeOQEVjziF92aT5BszufMcHmC6t8ELwn46bFlNI+grr9El feEZe/V5oXOc0rfYBTi9F54EC6XejPFHbJC2xO6QNKB0bUmL8EWaETXTMlg3ORcv6KYR xoAZJggLA7UmJSJHSydfoVuxVJ6/LyYoiNGCNSaThoZ5orNdlVc9kVKHmFWiNwS1CiNv iHEw==
MIME-Version 1.0
X-Received by 10.68.197.36 with SMTP id ir4mr16718665pbc.96.1383939584282; Fri, 08 Nov 2013 11:39:44 -0800 (PST)
In-Reply-To <l5jdi5$er3$1@reader1.panix.com>
References <l5j6q7$5ko$1@reader1.panix.com> <mailman.2240.1383934618.18130.python-list@python.org> <l5jdi5$er3$1@reader1.panix.com>
Date Sat, 9 Nov 2013 06:39:44 +1100
Subject Re: OT: How to tell an HTTP client to limit parallel connections?
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
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 <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>
Newsgroups comp.lang.python
Message-ID <mailman.2245.1383940002.18130.python-list@python.org> (permalink)
Lines 49
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1383940002 news.xs4all.nl 15959 [2001:888:2000:d::a6]:35423
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:58845

Show key headers only | View raw


On Sat, Nov 9, 2013 at 6:20 AM, Grant Edwards <invalid@invalid.invalid> wrote:
> On 2013-11-08, Chris Angelico <rosuav@gmail.com> wrote:
>> 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.

Yeah, but at least it's cut down from one connection per object to
some fixed number. But you've already done that.

>> 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?

You just set your hosts file to point the server's name to localhost
(or simply tell your browser to go to http://localhost/ if that's
easier), and have an SSH tunnel like:

ssh -L 80:localhost:80 user@some.server.whatever.it.is

Browser and server both think they're working with unencrypted HTTP on
loopback, but in between there's an encrypted link. Alternatively, if
you can point your browser to http://localhost:8000/ you can work with
a non-privileged port locally, which may be of value. The user at that
host needn't have much of interest as its shell - just something that
says "Press Enter to disconnect" and waits for a newline - as long as
it's configured to permit tunnelling (which is the default AFAIK). So
effectively, no browser support is needed.

The downside is that you need to consciously establish the secure
link. If you don't mind having the traffic travel the "last mile"
unencrypted, you could have a single long-term SSH tunnel set up, and
everyone connects via that; similarly, if your embedded server has a
trusted link to another box with a bit more grunt, you could end the
SSH tunnel there and run unencrypted for the last little bit. Anything
can be done, it's just a question of what'd be useful.

But like I said, it's a ridiculously stupid suggestion. Feel free to
discard it as such. :)

ChrisA

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


Thread

OT: How to tell an HTTP client to limit parallel connections? Grant Edwards <invalid@invalid.invalid> - 2013-11-08 17:25 +0000
  Re: OT: How to tell an HTTP client to limit parallel connections? donarb <donarb@nwlink.com> - 2013-11-08 09:39 -0800
  Re: OT: How to tell an HTTP client to limit parallel connections? Skip Montanaro <skip@pobox.com> - 2013-11-08 11:39 -0600
    Re: OT: How to tell an HTTP client to limit parallel connections? Grant Edwards <invalid@invalid.invalid> - 2013-11-08 18:01 +0000
  Re: OT: How to tell an HTTP client to limit parallel connections? Chris Angelico <rosuav@gmail.com> - 2013-11-09 05:16 +1100
    Re: OT: How to tell an HTTP client to limit parallel connections? Grant Edwards <invalid@invalid.invalid> - 2013-11-08 19:20 +0000
      Re: OT: How to tell an HTTP client to limit parallel connections? Chris Angelico <rosuav@gmail.com> - 2013-11-09 06:39 +1100
        Re: OT: How to tell an HTTP client to limit parallel connections? Grant Edwards <invalid@invalid.invalid> - 2013-11-08 20:48 +0000
          Re: OT: How to tell an HTTP client to limit parallel connections? Chris Angelico <rosuav@gmail.com> - 2013-11-09 08:01 +1100
            Re: OT: How to tell an HTTP client to limit parallel connections? Grant Edwards <invalid@invalid.invalid> - 2013-11-08 21:14 +0000
              Re: OT: How to tell an HTTP client to limit parallel connections? Chris Angelico <rosuav@gmail.com> - 2013-11-09 08:29 +1100
  RE: How to tell an HTTP client to limit parallel connections? Nick Cash <nick.cash@npcinternational.com> - 2013-11-08 19:42 +0000
    Re: How to tell an HTTP client to limit parallel connections? Grant Edwards <invalid@invalid.invalid> - 2013-11-08 21:02 +0000
  Re: OT: How to tell an HTTP client to limit parallel connections? Ian Kelly <ian.g.kelly@gmail.com> - 2013-11-08 13:13 -0700
    Re: OT: How to tell an HTTP client to limit parallel connections? Grant Edwards <invalid@invalid.invalid> - 2013-11-08 21:05 +0000

csiph-web