From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa0-f42.google.com (mail-oa0-f42.google.com [209.85.219.42]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by huchra.bufferbloat.net (Postfix) with ESMTPS id E9D5521F112; Sun, 28 Apr 2013 17:37:05 -0700 (PDT) Received: by mail-oa0-f42.google.com with SMTP id i10so5588910oag.1 for ; Sun, 28 Apr 2013 17:37:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=j+W/2jC2pcvVmH8gQse+3tsdKt4oe5rmDVJaiqbfXeE=; b=q5ItBA8U9M0KGv2oDjQZG6llkmy1OsVA6d0+MCtNFqyOmdn25PPyZt3DksiAt9oaYV rAhmSrlDdnzImEzrBDWgd8D2AD10aqfrWKQd8dmQZk5yf4CDs6bi0dXp1ubKtAlFw6ou j2QCRtJeJO4yyHUgY7oj9pxBL/JqHQDEsu5vFSByOcNO5zO29kKDOL76hT+KFtk+yDe2 WmqGDrwTBAkL8CBMb6vZi3jWnX9DNmNKo73XrtORQRI8ladfPuIwJzFPJCoTGCxMbAdr JCXrd83nEZ1h/kay+NXbye6t4mmnLvuaUOR2UKzTomoYfWcv2Oh9SlmlMXrypY/Tc7Jc 7y0Q== MIME-Version: 1.0 X-Received: by 10.182.236.202 with SMTP id uw10mr22704322obc.14.1367195825035; Sun, 28 Apr 2013 17:37:05 -0700 (PDT) Sender: gettysjim@gmail.com Received: by 10.76.154.69 with HTTP; Sun, 28 Apr 2013 17:37:04 -0700 (PDT) In-Reply-To: <1367175177.866711110@apps.rackspace.com> References: <1367175177.866711110@apps.rackspace.com> Date: Sun, 28 Apr 2013 20:37:04 -0400 X-Google-Sender-Auth: JG4JxxWj4MtSJSSrKz6H6JNNKaY Message-ID: From: Jim Gettys To: David P Reed Content-Type: multipart/alternative; boundary=001a11c35cd07d621004db7515e9 Cc: "codel@lists.bufferbloat.net" , "cerowrt-devel@lists.bufferbloat.net" , bloat Subject: Re: [Cerowrt-devel] [Codel] [Bloat] blip: a tool for seeing internet latency with javascript X-BeenThere: cerowrt-devel@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: Development issues regarding the cerowrt test router project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Apr 2013 00:37:06 -0000 --001a11c35cd07d621004db7515e9 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Sun, Apr 28, 2013 at 2:52 PM, wrote: > Actually, using HTTP 1.1 GET that generates a single packet in each > direction for a ping is quite reasonable. In fact, it is "better" for > measuring actual path latencies, since ICMP pings *could* be discriminate= d > against in a router along the way (in the "old days" people in the routin= g > community suggested that ICMP should be diverted off of the "fast path" t= o > avoid degrading the user experience). > Yes, using HTTP is good in this respect. I worked with the author of httping to get support for persistent connections 18 months or so ago. How to deal with proxies is one question, though one should mark the response uncachable. (unless the intent is to just test the path as far as the proxy. In practice, I've never seen signs of ICMP being put off the fast path in my testing; this doesn't mean it doesn't happen. > > > I've been using this technique to measure bufferbloat-induced delays on > Phones and Android phones for quite a while. I have a couple of servers > that use nginx "status" handlers to generate a short GET response without > touching files as my "targets". > > > > Since it depends on HTTP 1.1's re-use of the underlying TCP connection fo= r > successive GET commands, it's a bit fragile. > I don't think this should be particularly fragile, unless you know something I don't. Jim > > > Javascript can be made to do a lot of performance testing - you can acces= s > both TCP and DNS protocols from the browser, so if you play cards right, > you can cause single TCP exchanges and single UDP exchanges to happen wit= h > cooperative servers (web servers using HTTP 1.1 and DNS resolvers using > uncacheable UDP name lookups). > > > > > > > > > > On Sunday, April 28, 2013 10:56am, "Rich Brown" > said: > > > This is indeed a cool hack. I was astonished for a moment, because it > was a > > bedrock belief that you can't send pings from Javascript. And in fact, > that is > > still true. > > > > Apenwarr's code sends short HTTP queries of the format shown below to > each of two > > hosts: > > > > http://gstatic.com/generate_204 > > http://apenwarr.ca/blip/ > > > > The Blip tool shows ~60-70ms for the gstatic host, and ~130 msec for th= e > latter. > > Ping times are ~52 msec and 125msec, respectively. These times seem to > track > > response times by my eye (no serious analysis) to load both on my prima= ry > > (bloated) router and CeroWrt. > > > > Still a cool hack. > > > > Rich > > > > ------------------------- > > HTTP Request & Response for typical blip "ping" > > > > OPTIONS /generate_204 HTTP/1.1 > > Host: gstatic.com > > Connection: keep-alive > > Access-Control-Request-Method: GET > > Origin: http://gfblip.appspot.com > > User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) > AppleWebKit/537.31 > > (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31 > > Access-Control-Request-Headers: accept, origin, x-requested-with > > Accept: */* > > Referer: http://gfblip.appspot.com/ > > Accept-Encoding: gzip,deflate,sdch > > Accept-Language: en-US,en;q=3D0.8 > > Accept-Charset: ISO-8859-1,utf-8;q=3D0.7,*;q=3D0.3 > > > > HTTP/1.1 204 No Content > > Content-Length: 0 > > Content-Type: text/html; charset=3DUTF-8 > > Date: Sun, 28 Apr 2013 12:37:17 GMT > > Server: GFE/2.0 > > > > > > On Apr 26, 2013, at 7:04 PM, Dave Taht wrote: > > > > > Apenwarr has developed a really unique tool for seeing latency and > > > packet loss via javascript. I had no idea this was possible: > > > > > > http://apenwarr.ca/log/?m=3D201304#26 > > > > > > > > > > > > -- > > > Dave T=E4ht > > > > > > Fixing bufferbloat with cerowrt: > > http://www.teklibre.com/cerowrt/subscribe.html > > > _______________________________________________ > > > Bloat mailing list > > > Bloat@lists.bufferbloat.net > > > https://lists.bufferbloat.net/listinfo/bloat > > > > _______________________________________________ > > Cerowrt-devel mailing list > > Cerowrt-devel@lists.bufferbloat.net > > https://lists.bufferbloat.net/listinfo/cerowrt-devel > > > > > > > _______________________________________________ > Codel mailing list > Codel@lists.bufferbloat.net > https://lists.bufferbloat.net/listinfo/codel > > --001a11c35cd07d621004db7515e9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable


On Sun= , Apr 28, 2013 at 2:52 PM, <dpreed@reed.com> wrote:

Actually, using HTTP 1.1= GET =A0that generates a single packet in each direction for a ping is quit= e reasonable. =A0In fact, it is "better" for measuring actual pat= h latencies, since ICMP pings *could* be discriminated against in a router = along the way (in the "old days" people in the routing community = suggested that ICMP should be diverted off of the "fast path" to = avoid degrading the user experience).


Yes, using HTTP is good in this respect. =A0I worked with th= e author of httping to get support for persistent connections 18 months or = so ago.

How to deal with proxies is on= e question, though one should mark the response uncachable. (unless the int= ent is to just test the path as far as the proxy.

In practice, I've never seen signs of ICMP being put off the fast path= in my testing; this doesn't mean it doesn't happen.

=A0

I've been using this= technique to measure bufferbloat-induced delays on Phones and Android phon= es for quite a while. =A0I have a couple of servers that use nginx "st= atus" handlers to generate a short GET response without touching files= as my "targets".

=A0

Since it depends on HTTP= 1.1's re-use of the underlying TCP connection for successive GET comma= nds, it's a bit fragile.


I don't think this should be particularly fragile, unless you know some= thing I don't.

Jim

=A0

Javascript can be made t= o do a lot of performance testing - you can access both TCP and DNS protoco= ls from the browser, so if you play cards right, you can cause single TCP e= xchanges and single UDP exchanges to happen with cooperative servers (web s= ervers using HTTP 1.1 and DNS resolvers using uncacheable UDP name lookups)= .

=A0

=A0

=A0



On Sunday, April= 28, 2013 10:56am, "Rich Brown" <richb.hanover@gmail.com> said:

> This is indeed a co= ol hack. I was astonished for a moment, because it was a
> bedrock be= lief that you can't send pings from Javascript. And in fact, that is > still true.
>
> Apenwarr's code sends short HTTP quer= ies of the format shown below to each of two
> hosts:
>
>= ; http://gsta= tic.com/generate_204
> http://apenwarr= .ca/blip/
>
> The Blip tool shows ~60-70ms for the gstatic= host, and ~130 msec for the latter.
> Ping times are ~52 msec and 12= 5msec, respectively. These times seem to track
> response times by my eye (no serious analysis) to load both on my prim= ary
> (bloated) router and CeroWrt.
>
> Still a cool hac= k.
>
> Rich
>
> -------------------------
> HTTP Request & Response for typical blip "ping"
> =
> OPTIONS /generate_204 HTTP/1.1
> Host: gstatic.com
> Connection: keep-alive<= br> > Access-Control-Request-Method: GET
> Origin: http://gfblip.appspot.com
> = User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.= 31
> (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31
> Access-C= ontrol-Request-Headers: accept, origin, x-requested-with
> Accept: */= *
> Referer: http://gfblip.appspot.com/
> Accept-Encoding: gzip,deflate,sdch
> Accept-Language: en-US,en;q= =3D0.8
> Accept-Charset: ISO-8859-1,utf-8;q=3D0.7,*;q=3D0.3
> <= br>> HTTP/1.1 204 No Content
> Content-Length: 0
> Content-T= ype: text/html; charset=3DUTF-8
> Date: Sun, 28 Apr 2013 12:37:17 GMT
> Server: GFE/2.0
> >
> On Apr 26, 2013, at 7:04 PM, Dave Taht <dave.taht@gmail.com> wrote:=
>
> > Apenwarr has developed a really unique tool for seeing l= atency and
> > packet loss via javascript. I had no idea this was = possible:
> >
> > http://apenwarr.ca/log/?m=3D201304#26
> >
> >
> >
> > --
> > Dave T=E4h= t
> >
> > Fixing bufferbloat with cerowrt:
> http= ://www.teklibre.com/cerowrt/subscribe.html
> > _______________________________________________
> > Bloa= t mailing list
> > Bloat@lists.bufferbloat.net
> > https://list= s.bufferbloat.net/listinfo/bloat
>
> _______________________________________________
> Cerow= rt-devel mailing list
> Cerowrt-devel@lists.bufferbloat.net
>= https://lists.bufferbloat.net/listinfo/cerowrt-devel
>

=A0


_____________________________________________= __
Codel mailing list
Codel@lists.bufferbloat.net<= /a>
= https://lists.bufferbloat.net/listinfo/codel


--001a11c35cd07d621004db7515e9--