From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp201.iad.emailsrvr.com (smtp201.iad.emailsrvr.com [207.97.245.201]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by huchra.bufferbloat.net (Postfix) with ESMTPS id 92DBC21F0D3; Sun, 28 Apr 2013 11:52:59 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp30.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 19A6F20113; Sun, 28 Apr 2013 14:52:58 -0400 (EDT) X-Virus-Scanned: OK Received: from legacy16.wa-web.iad1a (legacy16.wa-web.iad1a.rsapps.net [192.168.4.106]) by smtp30.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id E9CD920112; Sun, 28 Apr 2013 14:52:57 -0400 (EDT) Received: from reed.com (localhost.localdomain [127.0.0.1]) by legacy16.wa-web.iad1a (Postfix) with ESMTP id D3FE02450001; Sun, 28 Apr 2013 14:52:57 -0400 (EDT) Received: by apps.rackspace.com (Authenticated sender: dpreed@reed.com, from: dpreed@reed.com) with HTTP; Sun, 28 Apr 2013 14:52:57 -0400 (EDT) Date: Sun, 28 Apr 2013 14:52:57 -0400 (EDT) From: dpreed@reed.com To: "Rich Brown" MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_20130428145257000000_26259" Importance: Normal X-Priority: 3 (Normal) X-Type: html Message-ID: <1367175177.866711110@apps.rackspace.com> X-Mailer: webmail7.0 Cc: codel@lists.bufferbloat.net, cerowrt-devel@lists.bufferbloat.net, bloat Subject: Re: [Cerowrt-devel] [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: Sun, 28 Apr 2013 18:52:59 -0000 ------=_20130428145257000000_26259 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =0A=0A =0AActually, using HTTP 1.1 GET that generates a single packet in e= ach direction for a ping is quite reasonable. In fact, it is "better" for = measuring actual path 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).=0A =0AI've been using this technique = to measure bufferbloat-induced delays on Phones and Android phones for quit= e 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".=0A = =0ASince it depends on HTTP 1.1's re-use of the underlying TCP connection f= or successive GET commands, it's a bit fragile.=0A =0AJavascript can be mad= e to do a lot of performance testing - you can access both TCP and DNS prot= ocols from the browser, so if you play cards right, you can cause single TC= P exchanges and single UDP exchanges to happen with cooperative servers (we= b servers using HTTP 1.1 and DNS resolvers using uncacheable UDP name looku= ps).=0A =0A =0A =0A=0A=0AOn Sunday, April 28, 2013 10:56am, "Rich Brown" said:=0A=0A=0A=0A> This is indeed a cool hack. I wa= s astonished for a moment, because it was a=0A> bedrock belief that you can= 't send pings from Javascript. And in fact, that is=0A> still true.=0A> =0A= > Apenwarr's code sends short HTTP queries of the format shown below to eac= h of two=0A> hosts:=0A> =0A> http://gstatic.com/generate_204=0A> http://ape= nwarr.ca/blip/=0A> =0A> The Blip tool shows ~60-70ms for the gstatic host, = and ~130 msec for the latter.=0A> Ping times are ~52 msec and 125msec, resp= ectively. These times seem to track=0A> response times by my eye (no seriou= s analysis) to load both on my primary=0A> (bloated) router and CeroWrt.=0A= > =0A> Still a cool hack.=0A> =0A> Rich=0A> =0A> -------------------------= =0A> HTTP Request & Response for typical blip "ping"=0A> =0A> OPTIONS /gene= rate_204 HTTP/1.1=0A> Host: gstatic.com=0A> Connection: keep-alive=0A> Acce= ss-Control-Request-Method: GET=0A> Origin: http://gfblip.appspot.com=0A> Us= er-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31= =0A> (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31=0A> Access-Contr= ol-Request-Headers: accept, origin, x-requested-with=0A> Accept: */*=0A> Re= ferer: http://gfblip.appspot.com/=0A> Accept-Encoding: gzip,deflate,sdch=0A= > Accept-Language: en-US,en;q=3D0.8=0A> Accept-Charset: ISO-8859-1,utf-8;q= =3D0.7,*;q=3D0.3=0A> =0A> HTTP/1.1 204 No Content=0A> Content-Length: 0=0A>= Content-Type: text/html; charset=3DUTF-8=0A> Date: Sun, 28 Apr 2013 12:37:= 17 GMT=0A> Server: GFE/2.0=0A> =0A> =0A> On Apr 26, 2013, at 7:04 PM, Dave = Taht wrote:=0A> =0A> > Apenwarr has developed a reall= y unique tool for seeing latency and=0A> > packet loss via javascript. I ha= d no idea this was possible:=0A> >=0A> > http://apenwarr.ca/log/?m=3D201304= #26=0A> >=0A> >=0A> >=0A> > --=0A> > Dave T=C3=A4ht=0A> >=0A> > Fixing buff= erbloat with cerowrt:=0A> http://www.teklibre.com/cerowrt/subscribe.html=0A= > > _______________________________________________=0A> > Bloat mailing lis= t=0A> > Bloat@lists.bufferbloat.net=0A> > https://lists.bufferbloat.net/lis= tinfo/bloat=0A> =0A> _______________________________________________=0A> Ce= rowrt-devel mailing list=0A> Cerowrt-devel@lists.bufferbloat.net=0A> https:= //lists.bufferbloat.net/listinfo/cerowrt-devel=0A>=0A ------=_20130428145257000000_26259 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

= =0A

=0A

Actually, using HTTP 1.1 GET  that ge= nerates a single packet in each direction for a ping is quite reasonable. &= nbsp;In fact, it is "better" for measuring actual path latencies, since ICM= P 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 di= verted off of the "fast path" to avoid degrading the user experience).

= =0A

 

=0A

I've been using this tec= hnique to measure bufferbloat-induced delays on Phones and Android phones f= or 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 "tar= gets".

=0A

 <= /p>=0A

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

=0A

 

=0A

Javascript can be made to do a lot of performance testing - you c= an access 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 happ= en with cooperative servers (web servers using HTTP 1.1 and DNS resolvers u= sing uncacheable UDP name lookups).

=0A

 

=0A

 

=0A

 

=0A=0A


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

=0A
=0A

> This is indeed a coo= l hack. I was astonished for a moment, because it was a
> bedrock b= elief 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://gstatic.com/generate_204
> http://apenwarr.ca/blip/<= br />>
> The Blip tool shows ~60-70ms for the gstatic host, and= ~130 msec for the latter.
> Ping times are ~52 msec and 125msec, r= espectively. These times seem to track
> response times by my eye (= no serious analysis) to load both on my primary
> (bloated) router = and CeroWrt.
>
> Still a cool hack.
>
> R= ich
>
> -------------------------
> HTTP Request &= amp; Response for typical blip "ping"
>
> OPTIONS /generat= e_204 HTTP/1.1
> Host: gstatic.com
> Connection: keep-alive=
> Access-Control-Request-Method: GET
> Origin: http://gfbl= ip.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.app= spot.com/
> Accept-Encoding: gzip,deflate,sdch
> Accept-Lan= guage: 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-Le= ngth: 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 <dave.taht@gmail.com= > wrote:
>
> > Apenwarr has developed a really uniqu= e tool for seeing latency and
> > packet loss via javascript. I = had no idea this was possible:
> >
> > http://apenwar= r.ca/log/?m=3D201304#26
> >
> >
> >
&= gt; > --
> > Dave T=C3=A4ht
> >
> > Fix= ing bufferbloat with cerowrt:
> http://www.teklibre.com/cerowrt/sub= scribe.html
> > _______________________________________________<= br />> > Bloat mailing list
> > Bloat@lists.bufferbloat.ne= t
> > https://lists.bufferbloat.net/listinfo/bloat
> > _______________________________________________
> Cerowrt-d= evel mailing list
> Cerowrt-devel@lists.bufferbloat.net
> h= ttps://lists.bufferbloat.net/listinfo/cerowrt-devel
>

=0A
= =0A

 

=0A

------=_20130428145257000000_26259--