HTTP vs. HTTPS
httpvshttps.com
httpvshttps.com
I suspect the author set out to prove this and then made the environment fit their agenda. Nothing to see here. I'm sure Spdy is faster than HTTP/1.1 but nowhere near what this site claims.
This is exactly where the "SPDY vs HTTP" factor comes in. With HTTP, you request each item, and wait for a response. This can only be done one item at a time[1] per HTTP/TCP connection, with a limit of 2-6 (depending on the browser) HTTP/TCP connections per unique hostname. As I mentioned in a comment below, this benchmark is using a single hostname, which is the worse possible situation for HTTP.
SPDY, or HTTP/2, instead using a single TCP connection, and multiplexes all the requests over it. In other words it can be downloading pieces of many other responses, all while waiting on other requests.
[1] - Yes, I am ignoring HTTP pipelining, because every other person who implemented a piece of HTTP software did as well. And no, neither I nor anyone else cares about older Opera supporting it :-)
Everything on the HTTP channel is slower, even stuff that shouldn't be.
<!-- "pre-load" HTTPS connection to remove TLS handshake latency when switching to HTTPS test. And set the detectio var -->
<script src="https://www.httpvshttps.com/detect-spdy.js"></script>
For some sites, handshake latency matters very little, so it makes sense to write the benchmark the way they did it. Anyway, the company who made the benchmark probably did it to prove a point: that an image-rich web page can load just as fast on HTTPS as on HTTP.Also, contrary to what a commenter said below, the site does carefully avoid caching interferences by downloading images with a random query string such as https://www.httpvshttps.com/check.jpg?123.179881
[1] eg. in Chrome pass --use-spdy=off
You are looking at one TCP connection for SPDY, with everything multiplexed. With HTTP, you are looking at, best case, 4 TCP connections to the server, that all start cold, doing 350+ requests in parallel. That's not even considering the potential for the server push feature with SPDY.
I love SPDY and all, but this is not even close to a real world scenario.
HTTP Archive shows the average number of requests per page is around the 100 mark (I suspect the median is higher) http://httparchive.org/trends.php#bytesTotal&reqTotal
By using many, very small downloads that probably never fill the congestion window the HTTP case is imposing a huge latency overheard on the test.
Looking at the connection view for the HTTP case in WebPageTest there's a HTTPS connection that delays the opening of the other parallel TCP connections - http://www.webpagetest.org/result/141202_VM_dc5d5bd74e398960... (for comparison SPDY test is http://www.webpagetest.org/result/141202_6B_a853f2009006b2ec...)
In my testing I've seen SPDY / HTTP/2 be anywhere from 35% faster to 5% slower, in my experience key factors to getting it to perform are quality of TLS config, whether the server supports prioritisation and TCP config.
From my testing, SPDY was generally 60% faster, but as of now it's been slow. Could be my computer or the server
The HTTP test has images that are ~5KB so after the first round trip for an image the congestion window grows but none of the subsequent requests grow it further, where as in a real world example many of the files would be larger than 5KB the window would grow further an the number of round trips would be reduced.
The SPDY example can make use of the ever growing congestion window because the multiplexing will fill it i.e. we'll get the data from more than one image in a single round trip.
It's not that the test isn't 'technically real-world' it's that it has (I don't think intentionally) a design that highlights an area where HTTP performs really poorly due to the latency penalty i.e. many very small requests.
A more real world test case would mirror a typical page construction with varying file sizes - HTTP Archive can give you some clues here.
Have a watch of John Rauser's "TCP and the lower bound of web performance" for more detail on slow start - https://www.youtube.com/watch?v=G6ah2cq4LFY
—— [1] Multiple XOR –> Multiplexor –> Multiplexer, an electronical circuit that hakes multiple bundles of lines and returns the values of the bundle which has been selected via the control input.
With SPDY, you can request all 300 requests up front and receive replies out of order so the server can send each chunk of data as it's ready.
Why? It's perfectly reasonable to be more concerned with real life behaviour than with benchmarks under optimal conditions.
3 tests
63%
59%
60%
Mac OS X 10.9.5
Google Chrome 39.0.2171.71 (64-bit)
Google Chrome Helper disabledMac OS X 10.10.1 Safari Version 8.0 (10600.1.25.1)
And yes, you did break it :/
http://moz.com/blog/enabling-https-without-sacrificing-web-p...