TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

HTTP/2 technology demo

165 pointsby LeZuseover 9 years ago

35 comments

youngtaffover 9 years ago
It is a real world demo though?<p>Similar to many of the other demo&#x27;s of HTTP&#x2F;2 (Gopher Tile, Akamai) it&#x27;s written in a way that presents HTTP&#x2F;1.x in the worst light and manages to screw things up even more.<p>HTTP&#x2F;1.1 is really latency prone so when you have a demo that uses lots of smalls requests that don&#x27;t fill up the congestion window you run into a couple of problems.<p>1. The browser can only use a limited number of connections to a host, so once these are in use the other requests queue behind waiting to a connection to become free.<p>2. Even when one becomes free, we&#x27;ve got the request &#x2F; response latency before the browser sees an images bytes<p>3. If the response doesn&#x27;t fill the congestion window i.e. it&#x27;s a small file, then there&#x27;s spare capacity that&#x27;s not being used i.e. packets we could have send it the round trip that didn&#x27;t.<p>4. In this demo the server sends connection: close so forces the browser to open a new TCP connection and negotiate TLS for each of the tiles, so the congestion window won&#x27;t grow either.<p>Yes, HTTP&#x2F;2 is faster, because it can send multiple requests at the same time to overcome latency, the server can fill the congestion window, and the window will grow.<p>But are our web pages build of tiny image tiles, or a greater variety of image and resources sizes?<p>EDIT: They&#x27;ve now enabled keep-alive which makes the HTTP&#x2F;1.1 test much faster than it was
评论 #10091882 未加载
评论 #10091883 未加载
评论 #10092129 未加载
评论 #10092060 未加载
评论 #10091845 未加载
sajal83over 9 years ago
The test is a lie. While I don&#x27;t doubt improvements in http&#x2F;2, this test uses &quot;Connection: close&quot; on the http&#x2F;1.1 test, which means for each tile there needs to be a tcp connect and TLS handshake. This is not representative of real world.<p>In http&#x2F;2 the &quot;Connection: close&quot; header is meaningless and all the tiles come from the same connection.
评论 #10091951 未加载
dijitover 9 years ago
the other server is 2x faster even without http&#x2F;2<p>My wget implementation does not suppot http&#x2F;2<p>HTTP Server:<p><pre><code> $ time wget https:&#x2F;&#x2F;1153288396.rsc.cdn77.org&#x2F;http2&#x2F;tiles_final&#x2F;tile_18.png [...] real 1.038 user 0.038 sys 0.007 pcpu 5.37 </code></pre> HTTP2 Server:<p><pre><code> $ time wget https:&#x2F;&#x2F;1906714720.rsc.cdn77.org&#x2F;http2&#x2F;tiles_final&#x2F;tile_18.png [...] real 0.539 user 0.045 sys 0.009 pcpu 10.01 </code></pre> of course that&#x27;s just latency.. but this is hardly a scientific demonstration.<p>We should also consider the fact that this is cherry picking the worst trait of HTTP&#x2F;1.1 and that&#x27;s that it&#x27;s latency sensitive.<p>A demo with a real webpage of large assets would be a better example.
评论 #10092407 未加载
评论 #10096919 未加载
评论 #10091868 未加载
cflatover 9 years ago
This is a copy of the Akamai&#x27;s http2 demo: <a href="http:&#x2F;&#x2F;http2.akamai.com" rel="nofollow">http:&#x2F;&#x2F;http2.akamai.com</a>
评论 #10091854 未加载
评论 #10092117 未加载
评论 #10091846 未加载
评论 #10092323 未加载
pornelover 9 years ago
This test only demonstrates that CDN77 can&#x27;t serve HTTP&#x2F;1.1 properly.
AhtiKover 9 years ago
This demo could be possibly even faster if using HTTP&#x2F;2.0 Server Push.<p>Btw, note that if you&#x27;re looking into supporting HTTP&#x2F;2.0 on your own then with nginx there&#x27;s still some waiting left: <a href="https:&#x2F;&#x2F;www.nginx.com&#x2F;blog&#x2F;early-alpha-patch-http2&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.nginx.com&#x2F;blog&#x2F;early-alpha-patch-http2&#x2F;</a> And there&#x27;s no plan to support server push with the first production release. So NGINX users will have to keep using SPDY.<p>AFAIK the latest plan with SPDY is to remove it from Chrome browser in early 2016 so nginx has to make sure to deliver before that...
sulamiover 9 years ago
Ran this a couple of times in Firefox 40&#x2F;Linux x86_64, HTTP&#x2F;1.1 was always faster by 10-20% (~1s vs. ~1.15s).
评论 #10092402 未加载
plumaover 9 years ago
Chrome 43 on Linux from Germany here.<p>HTTP&#x2F;2 routinely outperforms HTTP&#x2F;1.1 by several seconds for me. HTTP&#x2F;1.1 being somewhat stable at 7-8 seconds and HTTP varying from 4 to 11 seconds (though generally closer to 11 seconds than to 4).<p>The Akamai demo works fine: <a href="https:&#x2F;&#x2F;http2.akamai.com&#x2F;demo" rel="nofollow">https:&#x2F;&#x2F;http2.akamai.com&#x2F;demo</a> (though HTTP&#x2F;2 is only ahead by 20% or so)
sajal83over 9 years ago
It appears they turned on keep alive in http&#x2F;1.1 test now. http&#x2F;1.1 timings improved by a lot ... still obviously slower than http&#x2F;2
linksbroover 9 years ago
6.41s HTTP&#x2F;1.1 vs 2.51s HTTP&#x2F;2 on FF42. Very nice! (Although when HTTP2 is going the FPS drops quite a bit.)<p>Can someone explain what exactly HTTP2 is doing differently to achieve such an improvement?
评论 #10091825 未加载
评论 #10091902 未加载
评论 #10091801 未加载
jpmonetteover 9 years ago
12.75s vs 1.40s. This is quite impressive - looking forward to a faster Web, slowly migrating to HTTP&#x2F;2.<p>Any clue if Amazon CDN service is &#x2F; will offer HTTP&#x2F;2 support too?
评论 #10092056 未加载
Csheltonover 9 years ago
Recently the .net 4.6 has allowed windows server to run some http&#x2F;2 for the edge browser, it greatly improved the load speed and web socket calls of our app.
TwistedWeaselover 9 years ago
My results show 1.3s for HTTP&#x2F;1.1 and 3.0 seconds for HTTP&#x2F;2 using Chrome on OS X. So, this demo wasn&#x27;t very impressive for me.
评论 #10093972 未加载
评论 #10093861 未加载
saurikover 9 years ago
Ignoring HTTP&#x2F;2, I&#x27;m finding it very interesting that on my 11&quot; MacBookAir6,1 running OS X 10.9.5, Safari 7.0.6 is much faster than Chrome 44.0.2403.155 at the HTTP&#x2F;1.1 test. Safari performs the test in almost exactly 3.00 seconds, while Chrome never comes in under 3.15 and often takes as high as 3.45.
aberatiuover 9 years ago
Did anyone else observer the JS in the iframe footer? I&#x27;m just curios why it&#x27;s obfuscated and what&#x27;s its purpose (see surce of <a href="https:&#x2F;&#x2F;1153288396.rsc.cdn77.org&#x2F;http2&#x2F;http1.html" rel="nofollow">https:&#x2F;&#x2F;1153288396.rsc.cdn77.org&#x2F;http2&#x2F;http1.html</a>)
shdonover 9 years ago
Hm, HTTP&#x2F;1.1 at 15.5s, HTTP&#x2F;2 at 23.72s<p>Yeah, I &quot;can see the difference clearly&quot;, but I don&#x27;t think it is the kind of difference they expected or intended.<p>Edit: Firefox 40 on Windows 7 at work. Will try at home as well.<p>Oddly enough, the Akamai demo someone else posted gives me 18.47s for HTTP&#x2F;1.1 and 2.24s for HTTP&#x2F;2.
评论 #10091844 未加载
评论 #10091794 未加载
评论 #10091788 未加载
评论 #10093339 未加载
评论 #10091813 未加载
评论 #10091787 未加载
评论 #10092208 未加载
patrickmcmanusover 9 years ago
The test server does not actually make sure the h2 test is using h2. If you are using a client that does not have h2 support then you are just using the fallback code on the server and testing h1 against h1. An iphone is a good example :) (but it may be using spdy instead.. lots of variables)
manigandhamover 9 years ago
The speed test links at the bottom for single files don&#x27;t make any sense. A single file download wouldn&#x27;t benefit from the upgraded protocol and just seems, from very rough testing on my 100mb line, like the http&#x2F;1 links are artificially slowed down.
bhoustonover 9 years ago
Cheaper and faster than AWS Cloudfront with free custom SSL. So what is the catch?<p>One issue is our data is on S3 and I believe that any outgoing S3 traffic to this CDN would be slow and cost money, but S3 to CloudFront is is likely prioritized and free.
评论 #10092017 未加载
spullaraover 9 years ago
It is interesting that Safari &amp; Firefox beat Chrome in the HTTP&#x2F;1.1 test for me. However, the HTTP2 test is then twice as fast as Safari. Maybe we can stop smashing all those javascript files together.
kefsover 9 years ago
Here&#x27;s a fun overview video explanation of HTTP&#x2F;2 from the other day..<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=yc2Ug2GySCg" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=yc2Ug2GySCg</a>
apdapreturnsover 9 years ago
Perfect. <a href="http:&#x2F;&#x2F;puu.sh&#x2F;jIiG4&#x2F;731c98e894.jpg" rel="nofollow">http:&#x2F;&#x2F;puu.sh&#x2F;jIiG4&#x2F;731c98e894.jpg</a>
评论 #10093180 未加载
myth_busterover 9 years ago
For me (on FF) HTTP&#x2F;1.1 was faster in around 5&#x2F;7 attempts. I&#x27;m on corporate network so not sure that&#x27;s affecting it.
noitisntover 9 years ago
no connection: close anymore
评论 #10092159 未加载
throw7over 9 years ago
How about a demo that doesn&#x27;t require javascript to be enabled to work? Or is javascript a hard requirement for HTTP&#x2F;2?
jamesladdover 9 years ago
I ran the demo several times and I got a 1 second difference. I guess there is a place where even 1 second is important.
JustSomeNobodyover 9 years ago
Awesome! Now web sites can pack 6 times more ads and other cruft onto each page.
k__over 9 years ago
12.50 -&gt; 1.41<p>Chome 44, Win 7<p>With this, JS bundling is a thing of the past, I think.
评论 #10093800 未加载
gbachikover 9 years ago
Lol ran slower than http1 on my iPhone :&#x2F;
kgcover 9 years ago
HTTP&#x2F;2 is consistently slower for me...
joeblauover 9 years ago
Not sure what is going on, but here were my results.<p>HTTP1 - 3.13s<p>HTTP2 - 0.54s
Avalaxyover 9 years ago
HTTP1 - 10.88s<p>HTTP2 - 1.65s<p>Chrome on Windows 8.1.
darkhornover 9 years ago
How can I enable HTTP&#x2F;2 on Apache?
评论 #10094068 未加载
mtgxover 9 years ago
Now make those images webp.
rickjr1985over 9 years ago
this HTTP 2.0 was faster for me by only .01 seconds.