
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
    <channel>
        <title><![CDATA[ The Cloudflare Blog ]]></title>
        <description><![CDATA[ Get the latest news on how products at Cloudflare are built, technologies used, and join the teams helping to build a better Internet. ]]></description>
        <link>https://blog.cloudflare.com</link>
        <atom:link href="https://blog.cloudflare.com/" rel="self" type="application/rss+xml"/>
        <language>en-us</language>
        <image>
            <url>https://blog.cloudflare.com/favicon.png</url>
            <title>The Cloudflare Blog</title>
            <link>https://blog.cloudflare.com</link>
        </image>
        <lastBuildDate>Sat, 04 Apr 2026 16:34:11 GMT</lastBuildDate>
        <item>
            <title><![CDATA[Deprecating SPDY]]></title>
            <link>https://blog.cloudflare.com/deprecating-spdy/</link>
            <pubDate>Thu, 18 Jan 2018 15:58:00 GMT</pubDate>
            <description><![CDATA[ Participating in the Internet democracy occasionally means that technologies that were once popular lose their utility as newer technologies emerge. SPDY is one such technology.  As a result, we're announcing our intention to deprecate the use of SPDY for connections made to Cloudflare's edge. ]]></description>
            <content:encoded><![CDATA[ <p>Democratizing the Internet and making new features available to all Cloudflare customers is a core part of what we do. We're proud to be early adopters and have a long record of adopting new standards early, such as <a href="/introducing-http2/">HTTP/2</a>, as well as features that are experimental or not yet final, like <a href="/introducing-tls-1-3/">TLS 1.3</a> and <a href="/introducing-spdy/">SPDY</a>.</p><p>Participating in the Internet democracy occasionally means that ideas and technologies that were once popular or ubiquitous on the net lose their utility as newer technologies emerge. SPDY is one such technology. Several years ago, Google drafted a <a href="http://www.chromium.org/spdy/spdy-whitepaper">proprietary and experimental new protocol called SPDY</a>. SPDY offered many performance improvements over the aging HTTP/1.1 standard and these improvements resulted in significantly faster page load times for real-world websites. Stemming from its success, SPDY became the starting point for HTTP/2 and, when the new HTTP standard was finalized, the SPDY experiment came to an end where it gradually fell into disuse.</p><p>As a result, we're announcing our intention to deprecate the use of SPDY for connections made to Cloudflare's edge by February 21st, 2018.</p>
    <div>
      <h3>Remembering 2012</h3>
      <a href="#remembering-2012">
        
      </a>
    </div>
    <p>Five and a half years ago, when the majority of the web was unencrypted and web developers were resorting to creative tricks to improve performance (such as domain sharding to download resources in parallel) to get around the limitations of the then thirteen-year-old HTTP/1.1 standard, Cloudflare launched support for an exciting new protocol called SPDY.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/GcM2v0PkiVsXMHYMcNMFd/d4450ed0bde7202c91677354c4e0c486/0910152_02-A4-at-144-dpi.jpg" />
            
            </figure><p><a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a> by <a href="https://cds.cern.ch/record/1211045">Maximilien Brice</a></p><p>SPDY aimed to remove many of the bottlenecks present in HTTP/1.1 by changing the way HTTP requests were sent over the wire. Using header compression, request prioritization, and multiplexing, SPDY was able to provide significant performance gains while remaining compatible with the existing HTTP/1.1 standard. This meant that server operators could place a SPDY layer, such as Cloudflare, in front of their web application and gain the performance benefits of SPDY without modifying any of their existing code. SPDY effectively became a fast tunnel for HTTP traffic.</p>
    <div>
      <h3>2015: An ever-changing landscape</h3>
      <a href="#2015-an-ever-changing-landscape">
        
      </a>
    </div>
    <p>As the HTTPbis Working Group submitted SPDY for <a href="https://tools.ietf.org/html/draft-ietf-httpbis-http2-00">standardization</a>, the protocol underwent some changes (e.g.— Using <a href="https://tools.ietf.org/html/rfc7541">HPACK</a> for compression), but retained its core performance optimizations and came to be known as HTTP/2 in May 2015.</p><p>With the standardization of HTTP/2, Google announced that they would cease supporting SPDY with the public release of Chrome 51 in May 2016. This signaled to other software providers that they too should abandon support for the experimental SPDY protocol in favor of the newly standardized HTTP/2. Mozilla did so with the release of Firefox 51 in January 2017 and NGINX built their HTTP/2 module so that either it or the SPDY module could be used to terminate HTTPS connections, but not both.</p><p>Cloudflare announced support for HTTP/2 in December of 2015. It was at this point that we deviated from our peers in the industry. We knew that adoption of this new standard and the migration away from SPDY would take longer than the 1-2 year timeline put forth by Google and others, so we created our own patch for NGINX so that we could support terminating both SPDY and HTTP/2. This allowed Cloudflare customers who had yet to upgrade their clients to continue to receive the performance benefits of SPDY until they were able to support HTTP/2.</p><p>When we made this decision, SPDY was used for 53.59% of TLS connections to our edge and HTTP/2 for 26.79%. Had we only adopted the standard NGINX HTTP/2 module, we would've made the internet around 20% slower for more than half of all visitors to sites on Cloudflare— definitely not a performance compromise we were willing to make!</p>
    <div>
      <h3>To 2018 and Beyond</h3>
      <a href="#to-2018-and-beyond">
        
      </a>
    </div>
    <p>Two years after we began supporting HTTP/2 (and nearly three years after standardization), the majority of web browsers now support HTTP/2 where the notable exceptions are the UC Browser for Android and Opera Mini. This results in SPDY being used for only 3.83% of TLS connections to Cloudflare's edge whereas HTTP/2 accounts for 66.88%. At this point, and for several reasons, now is the time to stop supporting SPDY.</p><p><a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0</a> by <a href="https://pixabay.com/en/users/JanBaby-3005373/">JanBaby</a></p><p>Looking closer at the low percentage of clients connecting with SPDY in 2018, 65% of these connections are made by older iOS and macOS apps compiled against HTTP and TLS libraries which only support SPDY and not HTTP/2. This means that these app developers need to publish an update with HTTP/2 support to enable support for this protocol. We worked closely with Apple to assess the impact of deprecating SPDY for these clients and determined that the impact of deprecation is minimal.</p><p>We mentioned earlier that we applied our own patch to NGINX in order to be able to continue to support both SPDY and HTTP/2 for TLS connections. What we didn't mention was the engineering cost associated with maintaining this patch. Every time we want to update NGINX, we also need to update and test our patch, which makes each upgrade more difficult. Further, no active development is being done to SPDY so in the event that security issues arise, we would incur the cost of developing our own security patches.</p><p>Finally, when we do disable SPDY this February, the less than 4% of traffic that currently uses SPDY will still be able to connect to Cloudflare's edge by gracefully falling back to using HTTP/1.1.</p>
    <div>
      <h3>Moving Forward While Looking Back</h3>
      <a href="#moving-forward-while-looking-back">
        
      </a>
    </div>
    <p>Part of being an innovator is knowing when it is time to move forward and put older innovations in the rear view mirror. By seeing 10% of HTTP requests made on the internet, Cloudflare is in a unique position to analyze overall adoption trends of new technologies, allowing us to make informed decisions on when to launch new features or deprecate legacy ones.</p><p>SPDY has been extraordinarily beneficial to clients connecting to Cloudflare over the years, but now that the protocol is largely abandoned and superseded by newer technologies, we recognize that 2018 is time to say goodbye to an aging legacy protocol.</p> ]]></content:encoded>
            <category><![CDATA[SSL]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[spdy]]></category>
            <category><![CDATA[HTTP2]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <guid isPermaLink="false">3PXXT92K6072DYydBkCKiN</guid>
            <dc:creator>Max Nystrom</dc:creator>
        </item>
        <item>
            <title><![CDATA[Open sourcing our NGINX HTTP/2 + SPDY code]]></title>
            <link>https://blog.cloudflare.com/open-sourcing-our-nginx-http-2-spdy-code/</link>
            <pubDate>Fri, 13 May 2016 09:55:41 GMT</pubDate>
            <description><![CDATA[ In December, we released HTTP/2 support for all customers and on April 28 we released HTTP/2 Server Push support as well. ]]></description>
            <content:encoded><![CDATA[ <p>In December, we <a href="/introducing-http2/">released HTTP/2 support</a> for all customers and on April 28 we released <a href="/announcing-support-for-http-2-server-push-2/">HTTP/2 Server Push</a> support as well.</p><p>The release of HTTP/2 by CloudFlare had a <a href="/cloudflares-impact-on-the-http-2-universe/">huge impact</a> on the number of sites supporting and using the protocol. Today, <a href="http://isthewebhttp2yet.com/measurements/adoption.html#organization">50%</a> of sites that use HTTP/2 are served via CloudFlare.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/ivzR7ozInwwFcSoZD7fLj/5e431ce2e34bd056b09dd4f9a52661b9/4950445842_daabb0ae20_z.jpg" />
            
            </figure><p><a href="https://creativecommons.org/licenses/by/2.0/">CC BY 2.0</a> <a href="https://www.flickr.com/photos/jdhancock/4950445842/in/photolist-8xsk5w-cp4c1Q-g1SjoM-o6zhX1-eZbScr-pWSwPv-rafHbb-qEjnf2-dJ9WCw-eZbRVa-gJeKqf-ef7sWH-augo8B-5BNSQM-8eyuUM-5iBMWY-6tQ5es-74BxiW-bnh8zK-Attqbq-eZbTGp-eZbTy4-7TRcLo-8FuDVS-8xWVkW-rcVTV9-8j5QDB-eZoiTE-eZbQUz-oQHS69-eZohaG-o2rMkj-eZbSiz-eZo5ww-eZofqb-eZbQMD-eZbUc6-eZo5Tf-eZbTaV-eZoeAW-ifNAyH-eZohG3-eZbJoT-qhNbsA-eZoaKJ-eZbQm6-eZbTXn-eZbYdF-6JAeef-eZbXpT">image</a> by <a href="https://www.flickr.com/photos/jdhancock/">JD Hancock</a></p><p>When we released HTTP/2 support we decided not to deprecate SPDY immediately because it was still in widespread use and we <a href="/introducing-http2/#comment-2391853103">promised</a> to open source our modifications to NGINX as it was not possible to support both SPDY and HTTP/2 together with the standard release of NGINX.</p><p>We've extracted our changes and they are available as a <a href="https://github.com/cloudflare/sslconfig/tree/master/patches">patch here</a>. This patch should build cleanly against NGINX 1.9.7.</p><p>The patch means that NGINX can be built with both <code>--with-http_v2_module</code> and <code>--with-http_spdy_module</code>. And it will accept both the <code>spdy</code> and <code>http2</code> keywords to the <code>listen</code> directive.</p><p>To configure both HTTP/2 and SPDY in NGINX you'll need to run:</p>
            <pre><code>./configure --with-http_spdy_module --with-http_v2_module --with-http_ssl_module</code></pre>
            <p>Note that you need SSL support for both SPDY and HTTP/2.</p><p>Then it will be possible to configure an NGINX server to support both HTTP/2 and SPDY on the same port as follows:</p>
            <pre><code>server {
        listen       443 ssl spdy http2;
        server_name  www.example.com;

        ssl_certificate      cert.pem;
        ssl_certificate_key  cert.key;

        location / {
            root   html;
            index  index.html index.htm;
        }
}</code></pre>
            <p>Our patch uses <a href="https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation">ALPN</a> and NPN to advertise the availability of the two protocols. To test that the two protocols are being advertised you can use the OpenSSL client as follows (sending an empty ALPN/NPN extension in the ClientHello causes the server to return a list of available protocols).</p>
            <pre><code>openssl s_client -connect www.example.com:443 -nextprotoneg ''
CONNECTED(00000003)
Protocols advertised by server: h2, spdy/3.1, http/1.1</code></pre>
            <p>Many other tools for testing and debugging HTTP/2 connections can be found <a href="/tools-for-debugging-testing-and-using-http-2/">here</a>.</p><p>The patch puts HTTP/2 before SPDY/3.1 and will prefer HTTP/2 over SPDY/3.1. If a web browser offers both, HTTP/2 will be preferred and used for the connection.</p><p>We continue to support SPDY and HTTP/2 across all CloudFlare sites and will keep an eye on the percentage of connections that use SPDY before making a decision on its eventual deprecation.</p> ]]></content:encoded>
            <category><![CDATA[spdy]]></category>
            <category><![CDATA[NGINX]]></category>
            <category><![CDATA[HTTP2]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Reliability]]></category>
            <guid isPermaLink="false">7gEBf46aPQJcumKOasnoXP</guid>
            <dc:creator>John Graham-Cumming</dc:creator>
        </item>
        <item>
            <title><![CDATA[Announcing Support for HTTP/2 Server Push]]></title>
            <link>https://blog.cloudflare.com/announcing-support-for-http-2-server-push-2/</link>
            <pubDate>Thu, 28 Apr 2016 13:00:00 GMT</pubDate>
            <description><![CDATA[ Last November, we rolled out HTTP/2 support for all our customers. At the time, HTTP/2 was not in wide use, but more than 88k of the Alexa 2 million websites are now HTTP/2-enabled. ]]></description>
            <content:encoded><![CDATA[ <p>Last November, we <a href="/introducing-http2/">rolled out</a> HTTP/2 support for all our customers. At the time, HTTP/2 was not in wide use, but more than 88k of the Alexa 2 million websites are now HTTP/2-enabled. Today, <a href="http://isthewebhttp2yet.com/measurements/adoption.html#organization">more than 70%</a> of sites that use HTTP/2 are served via CloudFlare.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5BllrfZ3osa7oyYGPEUgfa/d97891945a77819a659806b652af406d/They_started_our_car_by_pushing_it_backwards_up_the_hill-_-3854246685-.jpg" />
            
            </figure><p><a href="https://creativecommons.org/licenses/by/2.0/">CC BY 2.0</a> <a href="https://commons.wikimedia.org/wiki/File:They_started_our_car_by_pushing_it_backwards_up_the_hill!_(3854246685).jpg">image</a> by <a href="https://www.flickr.com/people/83555001@N00">Roger Price</a></p>
    <div>
      <h3>Incremental Improvements On SPDY</h3>
      <a href="#incremental-improvements-on-spdy">
        
      </a>
    </div>
    <p>HTTP/2’s main benefit is multiplexing, which allows multiple HTTP requests to share a single TCP connection. This has a huge impact on performance compared to HTTP/1.1, but it’s nothing new—SPDY has been multiplexing TCP connections since at least 2012.</p><p>Some of the most important aspects of HTTP/2 have yet to be implemented by major web servers or edge networks. The real promise of HTTP/2 comes from brand new features like Header Compression and Server Push. Since February, we’ve been quietly testing and deploying HTTP/2 Header Compression, which resulted in an average 30% reduction in header size for all of our clients using HTTP/2. That's awesome. However, the real opportunity for a quantum leap in web performance comes from Server Push.</p>
    <div>
      <h3>Pushing Ahead</h3>
      <a href="#pushing-ahead">
        
      </a>
    </div>
    <p>Today, we’re happy to announce <a href="https://cloudflare.com/http2/server-push/">HTTP/2 Server Push support</a> for all of our customers. Server Push enables websites and APIs to speculatively deliver content to the web browser before the browser sends a request for it. This behavior is opportunistic, since in some cases, the content might already be in the client’s cache or not required at all.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/dHj9DypA42vVajxh1mB94/ba8f12ebadb8a3f405af9049cd254d3e/http2-server-push-2.png" />
            
            </figure><p>It’s been <a href="https://www.igvita.com/2013/06/12/innovating-with-http-2.0-server-push/">touted as one of the major features</a> of HTTP/2, and by enabling it, we cover the entire set of HTTP/2 features for all of our users. You can see it in action on our <a href="https://cloudflare.com/http2/server-push/">live Server Push demo</a>.</p><p>Server Push provides significant performance gains if used judiciously. In its most basic form, Server Push allows the server to “bundle” assets that the client didn’t ask for. It works by sending <a href="https://tools.ietf.org/html/rfc7540#section-6.6"><code>PUSH_PROMISE</code></a>—a declaration of the intention to send the assets, followed by the actual assets.</p><p>Upon the receipt of a <code>PUSH_PROMISE</code>, the client may respond with a <a href="https://tools.ietf.org/html/rfc7540#section-6.4"><code>RST_STREAM</code></a> message, indicating this asset is not needed. Even in this case, due to the asynchronous nature of HTTP/2, the client may receive the asset before the server gets the <code>RST_STREAM</code> message.</p><p>The <code>PUSH_PROMISE</code> looks a lot like an HTTP/2 GET request, and the client attempts to match received push promises before sending outgoing requests.</p>
    <div>
      <h3>Enabling Server Push</h3>
      <a href="#enabling-server-push">
        
      </a>
    </div>
    <p>All of our customers using HTTP/2 now have Server Push enabled, but unfortunately, Server Push isn’t one of those features that just works—you’ll need to do a little bit of work to truly leverage the benefits of Server Push.</p><p>Our implementation follows the guidelines laid out in the W3C’s draft standard on the use of a <a href="https://w3c.github.io/preload/#server-push-http-2"><code>preload</code></a> keyword in <code>Link</code> headers<a href="#fn1">[1]</a>, and we will continue to track that standard as it evolves.</p><p>So, if you want to push assets for a given request, you simply add a specially formatted <code>Link</code> header to the response:</p>
            <pre><code>Link: &lt;/asset/to/push.js&gt;; rel=preload; as=script</code></pre>
            <p>Those links can be manually added, but they’re already created automatically by many publishing tools or via plugins for popular content management systems (CMS) such as WordPress.</p><p>Only relative links will be pushed by our edge servers, which means Server Push won’t work with third-party resources.</p>
    <div>
      <h4>Disabling Server Push</h4>
      <a href="#disabling-server-push">
        
      </a>
    </div>
    <p>The <code>Link</code> header was originally designed to let browsers know that they should preload an asset. If you still need this behavior for legacy reasons, you can append the <code>nopush</code> directive to the header, like so:</p>
            <pre><code>Link: &lt;/dont/want/to/push/this.css&gt;; rel=preload; as=style; nopush</code></pre>
            
    <div>
      <h3>Is Server Push For Me?</h3>
      <a href="#is-server-push-for-me">
        
      </a>
    </div>
    <p>Server Push has the potential for tremendous performance gains. However, it’s not able to speed up every website, and it can even degrade the performance somewhat if you get overzealous. Generally, the downside of pushing assets that will end up unused is only the wasted bandwidth, while the upside is a speedup equivalent to one round trip from the client to our edge network.</p><p>Both the downside and the upside are mostly evident on slow, lossy connections, such as mobile networks. We suggest you profile the behavior of your individual website/API with and without Server Push to estimate the benefits. In our testing, we saw around a 45% performance gain when using Server Push on a mobile network.</p><p>Also note that because Server Push operates over a given HTTP/2 connection, it can only be used to push resources from <i>your</i> domain. If your website is bottlenecked on third-party assets, Server Push is unlikely to help you.</p><p>Some of the best use cases for HTTP/2 Server Push are:</p><ul><li><p>Uncacheable content - Content that is not cached on the edge benefits from Server Push, since it will be requested from the origin earlier in the connection.</p></li><li><p>All assets on a requested page - By pushing all the CSS, JS, and image assets on a given page, it’s possible to transfer the entire page in a single round trip. This is only useful when no third party assets are blocking the page rendering. If the majority of the assets are cached on the client’s browser, this behavior can be wasteful.</p></li><li><p>The most likely next page - If there is a link on the loaded page that is most likely clicked next (for example the most recent post in a blog) you could push both the HTML and all of that pages assets. When the user clicks the link, it will render almost instantly.</p></li></ul>
    <div>
      <h3>Profiling Server Push</h3>
      <a href="#profiling-server-push">
        
      </a>
    </div>
    <p>There are currently several tools and browsers that support Server Push. However, to visualize the performance benefits of the feature, the current <a href="https://www.google.co.uk/chrome/browser/canary.html">Canary</a> version of Google Chrome is the best. Here is an example of a webpage with five images loading with and without Server Push, as depicted in the timeline:</p>
    <div>
      <h4>Plain HTTP/2:</h4>
      <a href="#plain-http-2">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/73FpGNBukfaH2eXahBHOx0/7b5fb5b9a0ffb942efb3c3a9d84014d3/Screen-Shot-2016-04-26-at-15-07-53.png" />
            
            </figure><p>After the main page is loaded (and some processing time) the browser makes a request for the five images. After another round trip, those images are delivered and loaded.</p><h6>HTTP/2 + Server Push:</h6>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/awzxwhSEWtmEZk2hsuaxe/6e9e4afc662e655c77e8ced078a229d2/Screen-Shot-2016-04-26-at-15-08-59.png" />
            
            </figure><p>With Server Push enabled, we can see that the images are delivered while the page is being processed, thus no additional round trip is required. As soon as the images are needed, Chrome matches them with existing Push Promises and immediately uses them.</p><p>In Canary Chrome, you can also see that the pushed assets are identified in the Initiator column as Push/Other.</p>
    <div>
      <h4>Other browsers:</h4>
      <a href="#other-browsers">
        
      </a>
    </div>
    
    <div>
      <h4>Firefox</h4>
      <a href="#firefox">
        
      </a>
    </div>
    <p>Pushed assets will not get a timeline and are identified by a solid grey circle (unlike cached content that is identified by a non-solid circle, and a “cached” indication in the “Transferred tab”).</p><p><b>Plain HTTP/2:</b></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/50EP7Couz0xYY3nmdU0uMA/d29ab6853c8803bf8611f3dcc9b01b56/Screen-Shot-2016-04-26-at-17-25-15.png" />
            
            </figure><p><b>HTTP/2 + Server Push:</b></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/24DVYPcTyqoiOthb97LwCh/5d902ead36ff7749c39f007f8ecaf1b8/Screen-Shot-2016-04-26-at-17-25-42.png" />
            
            </figure>
    <div>
      <h4>Edge</h4>
      <a href="#edge">
        
      </a>
    </div>
    <p>Pushed assets won’t have the yellow bar in the timeline (TTFB), and under the Protocol tab, the protocol will appear as HTTPS and not HTTP/2.</p><p><b>Plain HTTP/2:</b></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3acdLJx33EUVZWqDfGvdqs/46a413799609ea4b66ffd6ea35fceb5d/Capture3.PNG.png" />
            
            </figure><p><b>HTTP/2 + Server Push:</b></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5JHBwo6FAHhA2xdkbKl07q/e97c0befd3367f6240236ba59324d229/Capture1.PNG.png" />
            
            </figure>
    <div>
      <h4>Safari</h4>
      <a href="#safari">
        
      </a>
    </div>
    <p>The Safari browser does not support Server Push at the moment, but support is expected in the near future.</p>
    <div>
      <h3>What’s Next For HTTP/2?</h3>
      <a href="#whats-next-for-http-2">
        
      </a>
    </div>
    <p>In the future, we plan to develop new tools to help our users to make more educated decisions in regards to Server Push. Over time, CloudFlare will even be able to predict the best assets to push automatically.</p><p>This feature is very new, and CloudFlare is the first major provider to deploy it at scale. We look forward to hearing from customers who make use of Server Push, now that we’ve made it available for experimentation.</p><p>We believe that Server Push is the most important upgrade to the web since SPDY. It has enormous potential to speed up the Internet since, for the first time, it gives website owners the power to <i>send</i> information to a web browser before the browser even asks for it.We’ll also be monitoring the still ongoing process of HTTP/2 development, especially efforts to make Server Push more aware of the client’s cache (thus reducing the number of redundant pushes).</p><hr /><ol><li><p>We are currently only looking at link elements in HTTP headers and not in page HTML. <a href="#fnref1">↩︎</a></p></li></ol> ]]></content:encoded>
            <category><![CDATA[HTTP2]]></category>
            <category><![CDATA[Reliability]]></category>
            <category><![CDATA[spdy]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">7Bo8uU68c3aWiKbCG8kwMq</guid>
            <dc:creator>Vlad Krasnov</dc:creator>
        </item>
        <item>
            <title><![CDATA[Ask Me Anything About HTTP/2]]></title>
            <link>https://blog.cloudflare.com/ask-me-anything-about-http-2/</link>
            <pubDate>Wed, 27 Apr 2016 19:10:38 GMT</pubDate>
            <description><![CDATA[ We're big fans of HTTP/2 at CloudFlare. Our customers make up the majority of HTTP/2 enabled domains today. HTTP/2 is a key part of the modern web, and its growth and adoption is changing how websites and applications are built. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>We're big fans of HTTP/2 at Cloudflare. Our customers make up <a href="/cloudflares-impact-on-the-http-2-universe/">the majority of HTTP/2 enabled domains</a> <a href="http://isthewebhttp2yet.com/measurements/adoption.html#organization">today</a>. HTTP/2 is a key part of the modern web, and its growth and adoption is changing how websites and applications are built.</p><p>On Thursday April 28, 2016, our friends at CatchPoint are hosting a live AMA (Ask Me Anything) with experts from CloudFlare, Akamai, and Google answering questions in real time about the protocol's features, adoption, and future.</p><p><b>When:</b> Thursday April 28, 2016 from 2pm-3pm Eastern Time (1600-1700 UTC)</p><p><b>How:</b> Ask questions <a href="http://pages.catchpoint.com/HTTP2-AMA-Registration.html?LSD=REF-CloudFlare">ahead of time</a> (and vote on questions). Join in <a href="http://pages.catchpoint.com/HTTP2-AMA-Registration.html?LSD=REF-CloudFlare">real-time</a> on Thursday.</p><p><b>Who:</b> Cloudflare's own <a href="https://twitter.com/SuzanneAldrich">Suzanne Aldrich</a> will join Ilya Grigorik from Google, Tim Kadlec from Akamai, and Andrew Smirnov from Catchpoint.</p><p>Need the basics on HTTP/2 ahead of time? Visit the <a href="https://www.cloudflare.com/http2/">Cloudflare HTTP/2 website</a>.</p> ]]></content:encoded>
            <category><![CDATA[HTTP2]]></category>
            <category><![CDATA[spdy]]></category>
            <category><![CDATA[Events]]></category>
            <category><![CDATA[Reliability]]></category>
            <guid isPermaLink="false">6zzv1B3ENdGhlirodQFXBP</guid>
            <dc:creator>John Roberts</dc:creator>
        </item>
        <item>
            <title><![CDATA[CloudFlare’s Impact On The HTTP/2 “Universe”]]></title>
            <link>https://blog.cloudflare.com/cloudflares-impact-on-the-http-2-universe/</link>
            <pubDate>Wed, 03 Feb 2016 17:16:10 GMT</pubDate>
            <description><![CDATA[ CloudFlare released HTTP/2 support for all customers on December 3rd, 2015. Now, two months later, it's time to take a look at the impact of this release on the HTTP/2 "universe". ]]></description>
            <content:encoded><![CDATA[ <p>CloudFlare <a href="/introducing-http2/">released HTTP/2 support</a> for all customers on December 3rd, 2015. Now, two months later, it's time to take a look at the impact of this release on the HTTP/2 "universe" and also at what has changed from a HTTP/2 vs. SPDY vs. HTTP 1.1 traffic ratio perspective.</p>
    <div>
      <h3>HTTP/2 Usage</h3>
      <a href="#http-2-usage">
        
      </a>
    </div>
    <p>Previously, we showcased browser market share data from our <a href="https://www.cloudflare.com">own website</a>. Using these numbers, we predicted the ratio of HTTP/2 traffic that we expected to see once enabled. Now, we can compare this original data set with updated data from the last 48 hours.</p><p>Below is the market share of HTTP/2 capable browsers that we saw on our website during a 48-hour period. The first one was before our HTTP/2 launch, the other one was last week. Both data sets were pulled from Google Analytics, and user agents were analyzed for HTTP/2 support.</p><table><tr><td><p><b>HTTP/2 capable browser</b></p></td><td><p><b>Global Market Share (Late Nov 2015)</b></p></td><td><p><b>Global Market Share (Late Jan 2016)</b></p></td></tr><tr><td><p>IE 11 on Windows 10</p></td><td><p>0.14%</p></td><td><p>0.34%</p></td></tr><tr><td><p>Edge 12, and 13</p></td><td><p>0.35%</p></td><td><p>0.48%</p></td></tr><tr><td><p>Firefox 36 - 45</p></td><td><p>5.09%</p></td><td><p>11.05%</p></td></tr><tr><td><p>Chrome 41 - 49</p></td><td><p>15.06%</p></td><td><p>38.86%</p></td></tr><tr><td><p>Safari 9</p></td><td><p>0.91%</p></td><td><p>2.69%</p></td></tr><tr><td><p>Opera 28 - 34</p></td><td><p>0.57%</p></td><td><p>0.78%</p></td></tr><tr><td><p>Safari for iOS 9.1</p></td><td><p>1.07%</p></td><td><p>0.94%</p></td></tr><tr><td><p>Opera 30 for Android</p></td><td><p>0.01%</p></td><td><p>0.00%</p></td></tr><tr><td><p>Chrome 46 - 48 for Android</p></td><td><p>3.59%</p></td><td><p>1.60%</p></td></tr><tr><td><p>Firefox 41 - 44 for Android</p></td><td><p>0.01%</p></td><td><p>0.00%</p></td></tr><tr><td><p><b>Total</b></p></td><td><p><b>26.79%</b></p></td><td><p><b>56.74%</b></p></td></tr></table><p>Since November, the number of browsers visiting CloudFlare.com that support HTTP/2 has more than doubled. In particular, notice how the market share of Chrome and Firefox versions that support HTTP/2 increased dramatically within the last 2 months.</p><p>The reason for this is, that even with Auto-Update functionality in modern browsers, new versions are not adopted instantaneous. We had documented the <a href="/ios-9-how-did-the-launch-really-go/">release of iOS 9</a>, which is an example for a quite swift adoption. Looking at the challenges around the <a href="/sha-1-deprecation-no-browser-left-behind/">SHA-1 deprecation</a>, we can see that some ancient OS and browser version are still around.</p><p>Keep in mind that we still see a larger number of non-browsers that don’t fall into any of the above buckets on our edge network. This is due to bots, crawlers, scrapers, and the like. The numbers above represent typical website traffic after it has been sanitized by CloudFlare.</p>
    <div>
      <h3>Real-Life Numbers</h3>
      <a href="#real-life-numbers">
        
      </a>
    </div>
    <p>With the promising browser market share data above, we can now compare the ratio of traffic served via the different HTTP versions on <a href="http://www.cloudflare.com">www.cloudflare.com</a>.</p><p>Again, contrast the data from around our release in December to the current data.</p><table><tr><td><p><b>Protocol Version</b></p></td><td><p><b>Percentage of Hits December 2015</b></p></td><td><p><b>Percentage of Hits February 2016</b></p></td></tr><tr><td><p>HTTP/1.x</p></td><td><p>19.36%</p></td><td><p>17.29%</p></td></tr><tr><td><p>SPDY/3.1</p></td><td><p>57.02%</p></td><td><p>29.79%</p></td></tr><tr><td><p>HTTP/2</p></td><td><p>23.62%</p></td><td><p>52.93%</p></td></tr></table><p>The great news: the HTTP/2 traffic ratio has indeed more than doubled on <a href="http://www.cloudflare.com">www.cloudflare.com</a> since we rolled out HTTP/2.</p><p>Nevertheless, we are still serving a large portion of traffic over SPDY, mostly due to older versions of Chrome. Therefore, it was a good choice to keep supporting this protocol version.</p>
    <div>
      <h3>Number of HTTP/2-Powered Websites</h3>
      <a href="#number-of-http-2-powered-websites">
        
      </a>
    </div>
    <p>So far, we have looked at what an individual HTTP/2 enabled site on CloudFlare could expect to see with regard to traffic and different browser versions. Let’s shift gears a bit and have a look at how many websites we have actually enabled with HTTP/2 so far:</p><p>The website <a href="http://isthewebhttp2yet.com/about.html">isthewebhttp2yet.com</a> is a great tool for finding an answer to this question. It is created and maintained by researchers at <a href="http://tid.es/">Telefónica Research</a>, <a href="http://www.case.edu/">Case Western Reserve University</a>, and <a href="http://www.cmu.edu/">Carnegie Mellon University</a>, and provides an overview of how many websites from the <a href="http://www.alexa.com/">Alexa</a> 1M list are enabled with HTTP/2.</p><p>The website differentiates between:</p><ul><li><p>Announced Support: Sites indicate which application-layer protocols they support using NPN/ALPN. If a site indicates HTTP/2, it is considered as "Announced Support."</p></li><li><p>Partial Support: Some sites that announce HTTP/2 support, but immediately downgrade the connection to HTTP 1.1 if a client makes a request using HTTP/2. If a site responds using HTTP/2, even just to return an error page or redirect, this is classified as partial support.</p></li><li><p>True Support: If a site actually serves page content using HTTP/2, even if some embedded objects are still served over HTTP 1.1, this is called true support.</p></li></ul><p>In this post, we will only focus on websites with "True Support"—since that’s what you get with CloudFlare—and will ignore the other two metrics.</p><p>Looking at the HTTP/2 adoption curve for the Alexa 1 million shows quite an interesting picture:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7BnsOVjWuTuxTs9kF8Aq1d/8472c37f0e5d19e9eece1c1d6ca5f673/image_0.png" />
            
            </figure><p><a href="http://isthewebhttp2yet.com/measurements/adoption.html">Source</a></p><p>You can see a sharp increase of domains with "True Support" in December 2015, bringing the number of domains with “True Support” from 14,017 (December 1st, 2015) to 75,288 (December 31st, 2015).</p><p>According to isthewebhttp2yet.com, 58,591 of these domains run through CloudFlare. That means CloudFlare more than quadrupled the number of HTTP/2 sites with the December 2015 release.</p><p>We’d like to give a big shout-out to the team of isthewebhttp2yet.com. They worked with our engineers to update their measurement method to include the <a href="https://en.wikipedia.org/wiki/Server_Name_Indication">Server Name Indication (SNI)</a> TLS extension when they probe sites for HTTP/2 support. By doing so, the site is able to identify all CloudFlare-powered sites. You can see this measurement change kicking in within the above graph at the sharp increase from 24,947 domains to 74,271 domains.</p>
    <div>
      <h3>HTTP/2 Market Position</h3>
      <a href="#http-2-market-position">
        
      </a>
    </div>
    <p>Another website measuring the adoption of HTTP/2 on the server side is <a href="http://w3techs.com/about">W3 Techs</a>. While the graph generated by W3 Techs for <a href="http://w3techs.com/technologies/details/ce-http2/all/all">HTTP/2 adoption</a> is much more coarse grained on the time axis, the increase of HTTP/2 enabled websites due to CloudFlare is nevertheless clearly visible.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2hINY81uWpCmSrT6ozbDlP/597b241d7375d61dd25265f26bb8148a/image_1.png" />
            
            </figure><p><a href="http://w3techs.com/technologies/details/ce-http2/all/all">Source</a></p><p>With our wide support of HTTP/2 for all CloudFlare customers, we have also helped to improve the market position—with regard to popularity and traffic—of HTTP/2 close to that of SPDY.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3NdetlPETbmBn8bZNUkAUa/59140469f45e806f3c97d836cdd563e1/image_2.png" />
            
            </figure><p><a href="http://w3techs.com/technologies/details/ce-http2/all/all">Source</a></p><p>Want to help us grow our software engineering team and increase our protocol support? Check out our <a href="https://www.cloudflare.com/join-our-team/">available roles</a>.</p>
    <div>
      <h3>Enabling HTTP/2</h3>
      <a href="#enabling-http-2">
        
      </a>
    </div>
    <p>As a reminder, if you are a customer on the Free or Pro plan, there is no need to do anything at all. Both SPDY and HTTP/2 are already enabled for you. With this improvement, your website’s audience will always use the fastest protocol version when accessing your site over TLS/SSL.</p><p>Customers on Business and Enterprise plans can enable HTTP/2 within the "Network" application of the CloudFlare Dashboard. In the last two months, the web still hasn't exploded while running HTTP/2. With that in mind, it's probably safe for you to head over an enabled HTTP/2 now. You will be in great company with many other sites.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5AKTIUpqfaeYazaMgZTXCY/363cffd72f4b339e9a39fb47d8ea1879/image_3.png" />
            
            </figure><p>If you are not yet a customer of CloudFlare, <a href="https://www.cloudflare.com/a/sign-up">sign up</a> now, and you’ll be able to leverage HTTP/2 within a few minutes.</p><p>Stay tuned for more additions to our HTTP/2 capabilities!</p> ]]></content:encoded>
            <category><![CDATA[HTTP2]]></category>
            <category><![CDATA[spdy]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <guid isPermaLink="false">2y3pT16YVh26JFMZWDYrHx</guid>
            <dc:creator>Christian Elsen</dc:creator>
        </item>
        <item>
            <title><![CDATA[HTTP/2 Demo: Under the Hood]]></title>
            <link>https://blog.cloudflare.com/http-2-demo-under-the-hood/</link>
            <pubDate>Fri, 11 Dec 2015 19:44:45 GMT</pubDate>
            <description><![CDATA[ At first glance, the potential performance improvements of HTTP/1.1 versus HTTP/2 on our demo page may seem a bit hard to believe. So, we put together a technical explanation of how this demo actually works.  ]]></description>
            <content:encoded><![CDATA[ <p>At first glance, the potential performance improvements of HTTP/1.1 versus HTTP/2 on our <a href="https://www.cloudflare.com/http2/">demo page</a> may seem a bit hard to believe. So, we put together a technical explanation of how this demo actually works. We’d also like to credit the <a href="http://http2.golang.org/gophertiles">Gophertiles demo</a>, which served as a basis for our own HTTP/2 demo.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1LWui8z0k4gKtqGkRw0nUs/4ef8bc2f54551788ccc7a47d27c4d717/http2-demo.png" />
            
            </figure>
    <div>
      <h3>Overview</h3>
      <a href="#overview">
        
      </a>
    </div>
    <p>A web page can only be served over either HTTP/1.1 or HTTP/2—mixing protocols is not allowed. Our <a href="https://www.cloudflare.com/http2/">demo page</a> is HTTP/2-enabled, so there’s no way to load HTTP/1.1 content directly on the same page. Inline frames (iframes) can be used to solve this issue. We embedded two iframes on our demo page, both containing the same source code. The key difference is that one iframe loads over an HTTP/1.1 CDN while the other loads over an HTTP/2 CDN.</p><p>We chose Amazon CloudFront for the HTTP/1.1 CDN because it can <i>only</i> serve content over HTTP/1.1. For the HTTP/2 CDN, we’re using our own HTTP/2-enabled network. You can take a look at the individual <a href="https://dprxmob557h5a.cloudfront.net/">HTTP/1.1</a> and <a href="https://http2demo.cloudflare.com/">HTTP/2</a> iframe content, which should have similar load times to the side-by-side example on our demo page.</p>
    <div>
      <h3>Iframe Content</h3>
      <a href="#iframe-content">
        
      </a>
    </div>
    <p>So, what is contained in each of these iframes? Each one is a full HTML page with JavaScript that builds <code>&lt;img&gt;</code> tags in sequential order. To clearly illustrate the performance gains of HTTP/2, 200 image tiles are requested in a short amount of time. A single large image was split up into 200 40x40 tiles with an image processing library called <a href="http://www.imagemagick.org/script/index.php">ImageMagick</a> using the following command:</p>
            <pre><code>convert -crop 40x40 +repage http2.png tile-%d.png</code></pre>
            <p>As the JavaScript loads these images, it keeps track of when the last image loads as well as the total load time of all images. Once this happens, the iframe needs to report the metrics to the parent window (the demo page itself).</p><p>Due to iframe cross-domain security rules, JavaScript cannot query the DOM of the iframe when the iframe is hosted on another domain. However, the iframe can send a message to the parent window using the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage">Window.postMessage</a> method. The parent window listens for this message using either an <code>addEventListener</code> or <code>attachEvent</code> method. When both iframes have loaded their content, the performance difference is displayed on the demo page.</p>
    <div>
      <h3>Caching Policy</h3>
      <a href="#caching-policy">
        
      </a>
    </div>
    <p>By default, CloudFlare’s <a href="https://www.cloudflare.com/features-cdn/">CDN</a> tries to cache as much as possible to get the best possible performance. This caused a problem for our HTTP/2 demo because various browsers were caching the image tiles locally, rendering our demo page rather useless. To fix this, we forced both the HTTP/1.1 and HTTP/2 CDNs to cache everything edgeside, but store nothing in the local browser cache.</p>
    <div>
      <h4>A Nifty Firefox Caching Bug/Feature</h4>
      <a href="#a-nifty-firefox-caching-bug-feature">
        
      </a>
    </div>
    <p>If you’re a Firefox user, you’ll notice that when you hit the <i>Reload</i> button on the demo page, the full image will display immediately even though the timers keep counting. This is because Firefox doesn’t respect our instructions to not cache the image tiles in the browser, even though we explicitly tell it not to.</p><p>Firefox made a decision some years ago to <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching_FAQ">cache everything</a>, including assets with no-cache headers. The rationale behind it is actually quite sound—it allows immediate forward/back navigation and better offline browsing functionality. With the exception of these kinds of demos, there’s no real downside.</p><p>Anyways, if you want to reload the demo in Firefox with the correct image-loading behavior, you can do a hard refresh with <code>Cmd+Shift+R</code> or <code>Ctrl+Shift+R</code>.</p>
    <div>
      <h3>SPDY Fallback</h3>
      <a href="#spdy-fallback">
        
      </a>
    </div>
    <p>Part of CloudFlare’s unique value proposition for HTTP/2 is an automatic SPDY fallback. When a visitor’s browser supports HTTP/2, our edge network will use HTTP/2. If it supports SPDY but not HTTP/2, we’ll respond in SPDY. Otherwise, we’ll fall back to HTTP/1.1. As discussed in our <a href="/introducing-http2/">HTTP/2 announcement blog post</a>, this lets us continue supporting about 57% of Internet users that are SPDY-enabled, but not HTTP/2-enabled.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3xfO6Wd9gydkLQQEnoz0S8/1155c05af1a3417ab858063031a75810/how-cloudflare-http2-works.png" />
            
            </figure><p>So, if you’re using Safari 8 or an Android browser, don’t worry! You may not be able to see the HTTP/2 demo, but our edge servers will fall back to SPDY, which should provide similar results.</p>
    <div>
      <h3>Remember, It’s a Demonstration, Not a Simulation</h3>
      <a href="#remember-its-a-demonstration-not-a-simulation">
        
      </a>
    </div>
    <p>The goal of our HTTP/2 demo is to clearly visualize the main benefits of HTTP/2 in a real-world environment. While it’s served up by real CDNs and transmitted over the same Internet cables that everybody else uses, it’s still an idealized scenario. The large number of image tiles highlights the efficiency of HTTP/2 multiplexing, but it’s not necessarily representative of your average web page.</p><p>It’s hard to provide general predictions about the performance improvements that any individual website can expect to see with HTTP/2 because it depends heavily on the structure of your web pages. If your website loads 200 tiny images simultaneously, then you’ll likely see speedups similar to our demo. Most web pages rely on fewer external assets, which means they may have less dramatic performance gains.</p><p>However, the HTTP/2 protocol was designed specifically to reduce web page load times as perceived by end users. The typical website should see <i>some</i> kind of significant performance gain just by switching to HTTP/2.</p> ]]></content:encoded>
            <category><![CDATA[HTTP2]]></category>
            <category><![CDATA[spdy]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <guid isPermaLink="false">3iUERmxOjSbH5vU56QYZuY</guid>
            <dc:creator>Marc Bodmer</dc:creator>
        </item>
        <item>
            <title><![CDATA[HTTP/2 For Web Developers]]></title>
            <link>https://blog.cloudflare.com/http-2-for-web-developers/</link>
            <pubDate>Thu, 10 Dec 2015 12:10:51 GMT</pubDate>
            <description><![CDATA[ HTTP/2 revolutionizes web optimization. Unlike HTTP/1.1's reliance on hacks like spriting and inlining for speed, HTTP/2 offers inherent performance improvements, simplifying development. ]]></description>
            <content:encoded><![CDATA[ <p>HTTP/2 changes the way web developers optimize their websites. In HTTP/1.1, it’s become common practice to eek out an extra 5% of page load speed by hacking away at your TCP connections and HTTP requests with techniques like spriting, inlining, domain sharding, and concatenation.</p><p>Life’s a little bit easier in HTTP/2. It gives the typical website a <a href="http://blog.chromium.org/2013/11/making-web-faster-with-spdy-and-http2.html">30% performance gain</a> without a complicated build and deploy process. In this article, we’ll discuss the new best practices for website optimization in HTTP/2.</p>
    <div>
      <h3>Web Optimization in HTTP/1.1</h3>
      <a href="#web-optimization-in-http-1-1">
        
      </a>
    </div>
    <p>Most of the <a href="https://www.cloudflare.com/application-services/products/website-optimization/">website optimization techniques</a> in HTTP/1.1 revolved around minimizing the number of HTTP requests to an origin server. A browser can only open a limited number of simultaneous TCP connections to an origin, and downloading assets over each of those connections is a serial process: the response for one asset has to be returned before the next one can be sent. This is called head-of-line blocking.</p><p>As a result, web developers began squeezing as many assets as they could into a single connection and finding other ways to trick browsers into avoiding head-of-line blocking. In HTTP/2, some of these practices can actually hurt page load times.</p>
    <div>
      <h3>The New Web Optimization Mindset for HTTP/2</h3>
      <a href="#the-new-web-optimization-mindset-for-http-2">
        
      </a>
    </div>
    <p>Optimizing for HTTP/2 requires a different mindset. Instead of worrying about reducing HTTP requests, web developers should focus on tuning their website’s caching behavior. The general rule is to <b>ship small, granular resources</b> so they can be cached independently and transferred in parallel.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/24AGzHZfCsK26xRbyOolht/4231f1d4ffc688eb34df4e9fa7f12cfd/http-2-multiplexing.png" />
            
            </figure><p>This shift occurs because of the <b>multiplexing</b> and <b>header compression</b> features of HTTP/2. Multiplexing lets multiple requests share a single TCP connection, allowing several assets to download in parallel without the unnecessary overhead of establishing multiple connections. This eliminates the head-of-line blocking issue of HTTP/1.1. Header compression further reduces the penalty of multiple HTTP requests, since the overhead for each request is smaller than the uncompressed HTTP/1.1 equivalent.</p><p>There are two other features of HTTP/2 that also change how you approach web optimization: <b>stream prioritization</b> and <b>server push</b>. The former lets browsers specify what order they want to receive resources, and the latter lets the server send extra resources that the browser doesn’t yet know it needs. To make the most of these new features, web developers need to unlearn some of the HTTP/1.1 best practices that have become second nature to them.</p>
    <div>
      <h3>Best Practices for HTTP/2 Web Optimization</h3>
      <a href="#best-practices-for-http-2-web-optimization">
        
      </a>
    </div>
    
    <div>
      <h4>Stop Concatenating Files</h4>
      <a href="#stop-concatenating-files">
        
      </a>
    </div>
    <p>In HTTP/1.1, web developers often combined all of the CSS for their entire website into a single file. Similarly, JavaScript was also condensed into a single file, and images were combined into a spritesheet. Having a single file for your CSS, JavaScript, and images vastly reduced the amount of HTTP requests, making it a significant performance gain for HTTP/1.1.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7Iecd2TKCbAeC1psMbKgkm/f1174abd7cf8789ae31bd8fb6b46bdf4/http-1-1-file-concatenation.png" />
            
            </figure><p>However, concatenating files is no longer a best practice in HTTP/2. While concatenation can still improve compression ratios, it forces expensive cache invalidations. Even if only a single line of CSS is changed, browsers are forced to reload <i>all</i> of your CSS declarations.</p><p>In addition, not every page in your website uses all of the declarations or functions in your concatenated CSS or <a href="https://www.cloudflare.com/learning/performance/why-minify-javascript-code/">JavaScript</a> files. After it’s been cached, this isn’t a big deal, but it means that unnecessary bytes are being transferred, processed, and executed in order to render the first page a user visits. While the overhead of a request in HTTP/1.1 made this a worthwhile tradeoff, it can actually slow down time-to-first-paint in HTTP/2.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5vGVOAARP8UNVvPIB70fyb/24482128b09677fc85c025401d584692/http-2-file-concatenation.png" />
            
            </figure><p>Instead of concatenating files, web developers should focus more on optimizing caching policy. By isolating files that change frequently from ones that rarely change, it’s possible to serve as much content as possible from your <a href="https://www.cloudflare.com/learning/cdn/what-is-a-cdn/">CDN</a> or the user’s browser cache.</p>
    <div>
      <h4>Stop Inlining Assets</h4>
      <a href="#stop-inlining-assets">
        
      </a>
    </div>
    <p>Inlining assets is a special case of file concatenation. It’s the practice of embedding CSS stylesheets, external JavaScript files, and images directly into an HTML page. For example, if you have web page that looks like this:</p>
            <pre><code>&lt;html&gt;
  &lt;head&gt;
	&lt;link rel="stylesheet" href="/style.css"&gt;
  &lt;/head&gt;
  &lt;body&gt;
	&lt;img src="logo.png"&gt;
	&lt;script src="scripts.min.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
&lt;/html&gt;</code></pre>
            <p>You could run it through an inlining tool to get something like this:</p>
            <pre><code>&lt;html&gt;
  &lt;head&gt;
	&lt;style&gt;

	  body {
		font-size: 18px;

		color: #999;
	  }
	&lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
	&lt;img src="data:image/png;base64,Rw0KGgoAAAANSUhEUgAAAEAABA..."&gt;
	&lt;script&gt;console.log('Hello, World!');&lt;/script&gt;
  &lt;/body&gt;
&lt;/html&gt;</code></pre>
            <p>In extreme cases, this can actually reduce the number of HTTP requests for a given web page to one. But, like file concatenation, you shouldn’t inline files you’re trying to optimize for HTTP/2.</p><p>Inlining means that browsers can’t cache individual assets. If you have CSS declarations that apply to your entire website embedded into every single HTML file, those declarations get sent back from the server every time. This results in redundant bytes being sent over the wire for every page that a user visits.</p><p>Inlining also has the unfortunate side effect of breaking stream prioritization. Because your CSS, JavaScript, and images are now embedded in your HTML, you’re effectively raising their priority to the same level as HTML content. This means that browsers can’t request assets in their preferred order, potentially increasing time-to-first-paint.</p><p>Instead of inlining assets, web developers should leverage HTTP/2’s server push functionality. Server push lets your web server say stuff like, "Hold on, you’re going to need this image and this CSS file to render that HTML page you just requested." Conceptually, this is the same as inlining an asset, but it doesn’t break stream prioritization, and it allows you to leverage a CDN and the user’s local browser cache, too.</p>
    <div>
      <h4>Stop Sharding Domains</h4>
      <a href="#stop-sharding-domains">
        
      </a>
    </div>
    <p>Domain sharding is a common technique for tricking browsers into opening more TCP connections than they’re supposed to. Browsers limit the number of connections to a single origin server, but by splitting your website’s assets across multiple domains, you can get it to open an extra set of TCP connections. This helps avoid head-of-line blocking, but it comes with significant tradeoffs.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/15BHvjDZ3lyXVv5ADPOI1a/3b95cf0335a377f66c18517cf0bf22c1/domain-sharding-1.png" />
            
            </figure><p>Domain sharding should be avoided in HTTP/2. Each shard results in an unnecessary DNS query, TCP connection, and <a href="https://www.cloudflare.com/learning/ssl/what-happens-in-a-tls-handshake/">TLS handshake</a> (assuming the servers use different <a href="https://www.cloudflare.com/application-services/products/ssl/">TLS certificates</a>). In HTTP/1.1, that overhead was compensated for by allowing several assets to download in parallel. But, this is no longer the case in HTTP/2: multiplexing allows multiple assets to download in parallel over a single connection. And, similar to asset inlining, domain sharding breaks HTTP/2 stream prioritization because browsers can’t prioritize streams across multiple domains.</p><p>If you’re currently sharding but want to leverage HTTP/2, you don’t necessarily need to go about <a href="https://www.cloudflare.com/learning/cloud/how-to-refactor-applications/">refactoring</a> your entire codebase. As discussed in our blog post on <a href="/using-cloudflare-to-mix-domain-sharding-and-spdy/">mixing domain sharding and SPDY</a>, browsers recognize when multiple origin servers use the same TLS certificate. When they do, the browser will reuse the same SPDY or HTTP/2 connection for both servers. This still results in multiple DNS queries, but it’s a decent compromise solution if you want the best performance under <a href="https://www.cloudflare.com/learning/performance/http2-vs-http1.1/">both HTTP/1.1 and HTTP/2</a>.</p>
    <div>
      <h3>Some Best Practices Are Still Best Practices</h3>
      <a href="#some-best-practices-are-still-best-practices">
        
      </a>
    </div>
    <p>Fortunately, not everything about web optimization changes in HTTP/2. There’s still several HTTP/1.1 best practices that carry over to HTTP/2. The rest of this article discusses techniques that you should be leveraging regardless of whether you’re optimizing for HTTP/1.1 or HTTP/2.</p>
    <div>
      <h4>Keep Reducing DNS Lookups</h4>
      <a href="#keep-reducing-dns-lookups">
        
      </a>
    </div>
    <p>Before a browser can request your website’s resources, it needs to find the IP address of your server using the <a href="https://www.cloudflare.com/learning/dns/what-is-dns/">domain name system (DNS)</a>. Until the DNS responds, the user is left staring at a blank screen. HTTP/2 is designed to optimize how web browsers communicate with web servers—it doesn’t affect the performance of the domain name system.</p><p>Since DNS queries can be expensive, especially if you have to start your query at the root nameservers, it’s still prudent to minimize the number of DNS lookups that your website uses. DNS prefetching via a <code>&lt;link rel='dns-prefetch' href='...' /&gt;</code> line in your document’s <code>&lt;head&gt;</code> can help, but it’s not a one-size-fits all solution.</p>
    <div>
      <h4>Keep Using a Content Delivery Network</h4>
      <a href="#keep-using-a-content-delivery-network">
        
      </a>
    </div>
    <p>It takes around 130ms for light to travel around the circumference of the earth. That’s latency that you <i>can’t</i> get rid of—it’s just physics. The imperfect nature of fiber optic cables and wireless connections, as well as the topology of the global Internet means that it actually takes closer to 300-400ms to transmit a network packet from your computer to a server that’s halfway around the world. User’s can perceive <a href="https://www.cloudflare.com/learning/performance/glossary/what-is-latency/">latency</a> as small as 100ms, and the only way to get around the laws of physics is to put your web assets geographically closer to your visitors via a CDN.</p>
    <div>
      <h4>Keep Leveraging Browser Caching</h4>
      <a href="#keep-leveraging-browser-caching">
        
      </a>
    </div>
    <p>You can take content delivery networks one step further by caching assets in the user’s local browser cache. This avoids any kind of data transfer over the network, aside from a 304 Not Modified response.</p>
    <div>
      <h4>Keep Minimizing the Size of HTTP Requests</h4>
      <a href="#keep-minimizing-the-size-of-http-requests">
        
      </a>
    </div>
    <p>Even though HTTP/2 requests are multiplexed, it takes time to transmit data over the wire. Accordingly, it’s still beneficial to reduce the amount of data you need to transfer. On the request end, this means minimizing the size of cookies, URL and query strings, and referrer URLs as much as possible.</p>
    <div>
      <h4>Keep Minimizing the Size of HTTP Responses</h4>
      <a href="#keep-minimizing-the-size-of-http-responses">
        
      </a>
    </div>
    <p>Of course, this holds true in the opposite direction. As a web developer, you want to make your server’s response as small as possible by minifying HTML, <a href="https://www.cloudflare.com/learning/performance/how-to-minify-css/">CSS</a>, and JavaScript Files, optimizing images for the web, and compressing resources with gzip.</p>
    <div>
      <h4>Keep Eliminating Unnecessary Redirects</h4>
      <a href="#keep-eliminating-unnecessary-redirects">
        
      </a>
    </div>
    <p>HTTP 301 and 302 redirects are sometimes a fact of life when migrating to a new platform or re-designing your website, but they should be eliminated wherever possible. Redirects result in an extra round trip from the browser to the server, and this adds unnecessary latency. You should be particularly wary of redirect chains where it takes more than a single redirect to get to the destination URL.</p><p>Server-side redirects like 301 and 302 responses aren’t ideal, but they aren’t the worst thing in the world, either. They can still be cached locally, so a browser can recognize the URL as a redirect and avoid an unnecessary round trip. Meta refreshes (e.g., <code>&lt;meta http-equiv="refresh"...</code>), on the other hand, are much more costly because they can’t be cached, and they can have performance issues in certain browsers.</p>
    <div>
      <h3>Conclusion (and Caveats)</h3>
      <a href="#conclusion-and-caveats">
        
      </a>
    </div>
    <p>And that’s HTTP/2 web optimization in a nutshell. Avoiding file concatenation, asset inlining, and domain sharding not only speeds up your website, but also makes for a much simpler build and deploy process.</p><p>There are, however, a few caveats to this discussion. Most servers, content delivery networks (including CloudFlare), and existing applications don’t support server push. Servers and CDNs will catch up soon enough, but for your application to benefit from server push, you’re going to have to make some changes to your codebase.</p><p>Also keep in mind is that HTTP/2 performance gains depend on the type of content you serve. For example, websites that rely on more external assets will see larger performance gains from HTTP/2 multiplexing than ones that have fewer HTTP requests.</p> ]]></content:encoded>
            <category><![CDATA[HTTP2]]></category>
            <category><![CDATA[spdy]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Optimization]]></category>
            <guid isPermaLink="false">7ASnS08pg4sCtRL32v054u</guid>
            <dc:creator>Ryan Hodson</dc:creator>
        </item>
        <item>
            <title><![CDATA[HTTP/2 is here! Goodbye SPDY? Not quite yet]]></title>
            <link>https://blog.cloudflare.com/introducing-http2/</link>
            <pubDate>Thu, 03 Dec 2015 13:59:00 GMT</pubDate>
            <description><![CDATA[ Today CloudFlare is introducing HTTP/2 support for all customers using SSL/TLS connections, while still supporting SPDY. There is no need to make a decision between SPDY or HTTP/2.  ]]></description>
            <content:encoded><![CDATA[ <p>Why choose, if you can have both? Today CloudFlare is <a href="https://www.cloudflare.com/http2/">introducing HTTP/2 support</a> for all customers using SSL/TLS connections, while still supporting SPDY. There is no need to make a decision between SPDY or HTTP/2. Both are automatically there for you and your customers.</p>
    <div>
      <h3>Enabling HTTP/2</h3>
      <a href="#enabling-http-2">
        
      </a>
    </div>
    <p>If you are a customer on the Free or Pro plan, there is no need to do anything at all. Both SPDY and HTTP/2 are already enabled for you. With this improvement, your website’s audience will always use the fastest protocol version when accessing your site over TLS/SSL.</p><p>Customers on Business and Enterprise plans can enable HTTP/2 within the "Network" application of the CloudFlare Dashboard.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7Bp5zCpcbaqFL4nb3yjVfv/c843a7b8f70d61314f21ba46df4d7de7/image_0.png" />
            
            </figure>
    <div>
      <h3>HTTP/2 is here!</h3>
      <a href="#http-2-is-here">
        
      </a>
    </div>
    <p>In February 2015, the IETF’s steering group for publication as standards-track RFCs approved the <a href="https://tools.ietf.org/html/rfc7540">HTTP/2</a> and associated <a href="https://tools.ietf.org/html/rfc7541">HPACK</a> specifications.</p><p>After more than 15 years, the Hypertext Transfer Protocol (HTTP) received a long-overdue upgrade. HTTP/2 is largely based on Google's experimental SPDY protocol, which was <a href="http://googleresearch.blogspot.com/2009/11/2x-faster-web.html">first announced</a> in November 2009 as an internal project to increase the speed of the web.</p>
    <div>
      <h3>Benefits of HTTP/2 and SPDY</h3>
      <a href="#benefits-of-http-2-and-spdy">
        
      </a>
    </div>
    <p>The main focus of both SPDY and HTTP/2 is performance, especially latency as perceived by the end-user while using a browser, with a secondary focus on network and server resource usage. One large benefit of HTTP/2 is the ability to use a single TCP connection from a browser to a website, or in the case of CloudFlare, a reverse proxy. As such, CloudFlare is in the perfect position to provide the benefits of HTTP/2 to all CloudFlare users by accelerating the web surfing experience between browsers and CloudFlare, without the need to change anything on the origin server.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/348oUcNVT22FQiRRcIPUeD/ea17992b5b885d69d896a9f2300fce8a/image_1.png" />
            
            </figure><p>Although HTTP/2 is based on Google's experimental SPDY protocol, it has evolved, incorporating several improvements in the process. Nevertheless, it maintains many of the benefits known from SPDY:</p><ul><li><p><b>Multiplexing and concurrency</b>: Several requests can be sent over the same TCP connection, and responses can be received out of order, eliminating the need for multiple connections between the client and the server and reducing head-of-line blocking.</p></li><li><p><b>Stream dependencies</b>: The client can indicate to the server which resources are more important than others.</p></li><li><p><b>Header compression</b>: HTTP header size is reduced.</p></li><li><p><b>Server push</b>: The server can send resources the client has not yet requested (This is not yet implemented within NGINX or at CloudFlare, but will become available in the future. It is currently enabled on the experimental test bed server <a href="https://http2.cloudflare.com/">https://http2.cloudflare.com/</a>).</p></li></ul><p>While the HTTP/2 specification does not require TLS, all major browser vendors have indicated that they will only support HTTP/2 over a TLS connection. As a result, CloudFlare only supports HTTP/2 over TLS. Of course, TLS is free with CloudFlare’s Universal SSL.</p>
    <div>
      <h3>Page load improvements with SPDY and HTTP/2</h3>
      <a href="#page-load-improvements-with-spdy-and-http-2">
        
      </a>
    </div>
    <p>Let’s have a look at some real life numbers from the CloudFlare website (<a href="https://www.cloudflare.com">https://www.cloudflare.com</a>) for average page load time. These values (based on a 48h timeframe) should provide an estimate of what improvements you can expect using SPDY and HTTP/2:</p><table><tr><td><p><b>Access via HTTP Protocol Version</b></p></td><td><p><b>Average Page Load time</b></p></td></tr><tr><td><p>HTTP 1.x</p></td><td><p>9.07 sec.</p></td></tr><tr><td><p>SPDY/3.1</p></td><td><p>7.06 sec.</p></td></tr><tr><td><p>HTTP/2</p></td><td><p>4.27 sec.</p></td></tr></table>
    <div>
      <h3>Goodbye SPDY?</h3>
      <a href="#goodbye-spdy">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/K37xNZoMm22rZNTTPTFN9/49f0083161c49230da37ff3ef5bc7dfc/image_2.jpg" />
            
            </figure><p><a href="https://creativecommons.org/licenses/by/2.0/">CC BY 2.0 image</a> by <a href="https://www.flickr.com/photos/wwworks/5841979717/in/photostream/">woodleywonderworks</a></p><p>It's no secret that CloudFlare uses a modified version of NGINX as the reverse proxy component in charge of terminating the end-user connection. After NGINX announced availability of the <a href="https://www.nginx.com/blog/nginx-1-9-5/">NGINX Open Source 1.9.5 Release</a> with HTTP/2 support on September 22nd, the wait for HTTP/2 seemed to be over.</p><p>The introduction of the new HTTP/2 module for NGINX also meant that the existing NGINX SPDY module could not be used in parallel. You had to choose to either support the termination of HTTP/2 or SPDY connections on a single NGINX server, but not both. The justification for this approach was based on Google saying goodbye to SPDY and <a href="http://blog.chromium.org/2015/02/hello-http2-goodbye-spdy-http-is_9.html">deprecating the protocol</a>, starting in January 2016.</p><p>But what would have actually happened if CloudFlare turned off SPDY today while turning on HTTP/2? What would be the impact on our existing user base as well as our customers? As the best decisions are always ones backed by solid data, we looked at what replacing SPDY with HTTP/2 today would mean.</p>
    <div>
      <h2>Usage of SPDY today</h2>
      <a href="#usage-of-spdy-today">
        
      </a>
    </div>
    <p>CloudFlare started <a href="/introducing-spdy/">support for SPDY</a> in June 2012 and upgraded to the <a href="/staying-up-to-date-with-the-latest-protocols-spdy-3-1/">current version of SPDY (3.1)</a> in February 2014. It’s pretty straightforward for us to determine how many SSL/TLS connections are established today via SPDY/3.1 versus HTTP/1.x.</p><p>During the week before our HTTP/2 launch, 80.38% of all SSL/TLS connections to our own website at <a href="http://www.cloudflare.com">www.cloudflare.com</a> were made over SPDY/3.1.</p><p>The overall ratio of SPDY/3.1 connections that we see on our network is lower than this due to the number of bots, scrapers, and attackers using HTTP/1.x. Instead, the above number is a good representation of what legitimate traffic a regular website should see, after traffic has been sanitized.</p>
    <div>
      <h4>HTTP/2 usage</h4>
      <a href="#http-2-usage">
        
      </a>
    </div>
    <p>Without actually rolling out HTTP/2, it’s not that easy to determine what percentage of users to any individual website will benefit. But, there are two approaches to getting a useful estimate up front.</p><p>Let's start with the one that you could easily replicate yourself for your own website by using Google Analytics.</p><p>The well-known website caniuse.com provides information on what browsers and their version <a href="http://caniuse.com/#feat=http2">support HTTP/2</a>. Combine this with data from Google Analytics on how often a website was accessed by this type of browser for a given time, and you gain the information of what ratio of requests could have been served over HTTP/2. During the last 48 hours, web traffic to our own website from HTTP/2-capable browsers looked like this:</p><table><tr><td><p><b>HTTP/2 capable browser</b></p></td><td><p><b>Global Market Share</b></p></td></tr><tr><td><p>IE 11 on Windows 10</p></td><td><p>0.14%</p></td></tr><tr><td><p>Edge 12, and 13</p></td><td><p>0.35%</p></td></tr><tr><td><p>Firefox 36 - 45</p></td><td><p>5.09%</p></td></tr><tr><td><p>Chrome 41 - 49</p></td><td><p>15.06%</p></td></tr><tr><td><p>Safari 9</p></td><td><p>0.91%</p></td></tr><tr><td><p>Opera 28 - 34</p></td><td><p>0.57%</p></td></tr><tr><td><p>Safari for iOS 9.1</p></td><td><p>1.07%</p></td></tr><tr><td><p>Opera 30 for Android</p></td><td><p>0.01%</p></td></tr><tr><td><p>Chrome 46 for Android</p></td><td><p>3.59%</p></td></tr><tr><td><p>Firefox 41 for Android</p></td><td><p>0.01%</p></td></tr><tr><td><p><b>Total</b></p></td><td><p><b>26.79%</b></p></td></tr></table><p>This would mean that a little more than a quarter of all browsers accessing our website could have used HTTP/2 during this time frame.</p><p>Again, we see a larger number of non-browsers, which don’t fall into any of the above buckets, on our edge. This is due to bots, crawlers, scrapers, and the like. The numbers above represent typical website traffic after it has been sanitized by CloudFlare.</p><p>After looking at the ratio of browsers that caniuse.com estimates to support HTTP/2 today, we can see a large discrepancy between our estimated 26.79% and the ratio of between 61.7% and 67.89% that caniuse.com estimates. Unfortunately, caniuse.com is overestimating the ratio of some of the above browsers. In particular, the value for "Chrome 46 for Android" appears to incorrectly include all Chrome for Android versions, even though these versions do not have HTTP/2 support.</p>
    <div>
      <h3>Replacing SPDY with HTTP/2?</h3>
      <a href="#replacing-spdy-with-http-2">
        
      </a>
    </div>
    <p>Both SPDY and HTTP/2 provide numerous benefits to website owners. Without support for HTTP/2 or SPDY on the browser or server side, the connection can only be established via HTTP/1.x, which usually means higher page load times and a reduced experience.</p><p>Replacing SPDY with HTTP/2 today would have meant dropping support for faster web surfing from 80.38% of our end-users to 26.79% of them, which is a difference of 53.59 percentage points.</p><p>Instead, by doing both, we ensure that users with browsers only supporting SPDY/3.1 can still get the best web surfing experience on our customers’ sites, while at the same time ensuring that users with newer browser versions that only support HTTP/2 are and will continue to get the best experience possible.</p>
    <div>
      <h3>Real-Life Numbers</h3>
      <a href="#real-life-numbers">
        
      </a>
    </div>
    <p>After running our own Website <a href="http://www.cloudflare.com">www.cloudflare.com</a> with HTTP/2 and SPDY support for more than 48 hours, we were able to extract some real-life numbers for connections established over HTTP/2 and SPDY versus HTTP/1.x:</p><table><tr><td><p><b>Protocol Version</b></p></td><td><p><b>Percentage of Hits</b></p></td></tr><tr><td><p>HTTP/1.x</p></td><td><p>19.36%</p></td></tr><tr><td><p>SPDY/3.1</p></td><td><p>57.02%</p></td></tr><tr><td><p>HTTP/2</p></td><td><p>23.62%</p></td></tr></table><p>These real-life numbers show that we were on the right path with not removing SPDY in favor of HTTP/2.</p>
    <div>
      <h3>Check it yourself: What do servers speak?</h3>
      <a href="#check-it-yourself-what-do-servers-speak">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/pd4NcIeNRHLNrU0TXnQKk/1a90b47826e786c3f6b26289bf0b7495/image_3.jpg" />
            
            </figure><p><a href="https://creativecommons.org/licenses/by/2.0/">CC BY 2.0 image</a> by <a href="https://www.flickr.com/photos/86530412@N02/8210762750">Chris Potter</a></p><p>You can easily check the HTTP/2 support status for a web page yourself. For this, we need to understand first how the protocol negotiation for both HTTP/2 and SPDY works. Browser and web servers use Application-Layer Protocol Negotiation (ALPN) or the slightly older Next Protocol Negotiation (NPN) Transport Layer Security (TLS) extension to negotiate what protocol the server and client "speak".</p><p>Using OpenSSL, you can easily validate what versions CloudFlare's Edge servers are able to use:</p>
            <pre><code>openssl s_client -servername www.cloudflare.com -connect www.cloudflare.com:443 -nextprotoneg ''
CONNECTED(00000003)
Protocols advertised by server: h2, spdy/3.1, http/1.1</code></pre>
            <p>The advertised protocols include <code>h2</code> for HTTP/2, <code>spdy/3.1</code> for the current version of SPDY and <code>http/1.1</code> for HTTP/1.1 as a fallback mechanism.</p><p>Similarly, clients will present to the web server the protocols they support.</p>
    <div>
      <h3>Learn more</h3>
      <a href="#learn-more">
        
      </a>
    </div>
    <p>Want to learn more about how HTTP/2 and SPDY works, the benefits it brings to your website's audience, and how we can help you speed up your website? Check out our HTTP/2 resources at <a href="https://www.cloudflare.com/http2/">cloudflare.com/http2</a>.</p> ]]></content:encoded>
            <category><![CDATA[spdy]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[HTTP2]]></category>
            <category><![CDATA[TLS]]></category>
            <category><![CDATA[SSL]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">4rVdVYaHlL7RuPZSFK7SaK</guid>
            <dc:creator>Christian Elsen</dc:creator>
        </item>
        <item>
            <title><![CDATA[The little extra that comes with Universal SSL]]></title>
            <link>https://blog.cloudflare.com/the-little-extra-that-comes-with-universal-ssl/</link>
            <pubDate>Mon, 06 Oct 2014 21:35:38 GMT</pubDate>
            <description><![CDATA[ Last Monday we announced our SSL for Free plan users called Universal SSL. Universal SSL means that any site running on CloudFlare gets a free SSL certificate, and is automatically secured over HTTPS. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>CC BY 2.0 by <a href="https://www.flickr.com/photos/jdhancock/">JD Hancock</a></p><p>Last Monday we announced our SSL for Free plan users called <a href="/introducing-universal-ssl/">Universal SSL</a>. Universal SSL means that any site running on CloudFlare gets a <a href="https://www.cloudflare.com/application-services/products/ssl/">free SSL certificate</a>, and is automatically secured over HTTPS.</p><p>Using SSL for a web site helps make the site more secure, but there's another benefit: it can also make the site faster. That's because the <a href="http://en.wikipedia.org/wiki/SPDY">SPDY protocol</a>, created by Google to speed up the web, actually requires SSL and only web sites that support HTTPS can use SPDY.</p><p>CloudFlare has long supported <a href="/introducing-spdy/">SPDY</a>, and kept up to date with improvements in the protocol. We currently support the most recent version of SPDY: <a href="/staying-up-to-date-with-the-latest-protocols-spdy-3-1/">3.1</a>.</p><p>CloudFlare's mission to bring the tools of the Internet giants to everyone is two fold: security and performance. As part of the Universal SSL launch, we also rolled out SPDY for everyone. Many of the web's largest sites use SPDY; now all sites that use CloudFlare are in the same league.</p><p>If your site is on CloudFlare, and you use a modern browser that supports SPDY, you'll find that the HTTPS version of your site is now served over SPDY. SPDY allows the browser to query for multiple objects in one request, and for the objects to be sent down the wire as they are ready to prevent hold-ups—that can be a big performance win.</p><p>Our goal is a faster, safer, more secure Internet. Universal SSL and SPDY for everyone are two big steps in that direction.</p> ]]></content:encoded>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Google]]></category>
            <category><![CDATA[spdy]]></category>
            <category><![CDATA[HTTPS]]></category>
            <category><![CDATA[Universal SSL]]></category>
            <category><![CDATA[SSL]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">4PvbgsCFQYYxbLxKwrmajz</guid>
            <dc:creator>John Graham-Cumming</dc:creator>
        </item>
        <item>
            <title><![CDATA[Introducing Universal SSL]]></title>
            <link>https://blog.cloudflare.com/introducing-universal-ssl/</link>
            <pubDate>Mon, 29 Sep 2014 09:56:21 GMT</pubDate>
            <description><![CDATA[ The team at CloudFlare is excited to announce the release of Universal SSL™. Beginning today, we will support SSL connections to every CloudFlare customer, including the 2 million sites that have signed up for the free version of our service. ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3E785dpi05PQSFKAZkuMDg/fb3b97cdcfb56e3fb4df1983a26e3732/cloudflare-illustration-universal-ssl--1-.png" />
            
            </figure><p>The team at CloudFlare is excited to announce the release of Universal SSL™. Beginning today, we will support SSL connections to every CloudFlare customer, including the 2 million sites that have signed up for the free version of our service.</p><p>This morning we began rolling out the Universal SSL across all our current customers. We expect this process to be complete for all current customers before the end of the day. Yesterday, there were about 2 million sites active on the Internet that supported encrypted connections. By the end of the day today, we'll have doubled that.</p><p>For new customers who sign up for <a href="https://www.cloudflare.com/plans/free/">CloudFlare's free plan</a>, after we get through provisioning existing customers, it will take up to 24 hours to activate Universal SSL. As always, SSL for <a href="https://www.cloudflare.com/plans/">paid plans</a> will be provisioned instantly upon signup.</p>
    <div>
      <h3>How does it work?</h3>
      <a href="#how-does-it-work">
        
      </a>
    </div>
    <p>For all customers, we will now automatically provision a <a href="https://www.cloudflare.com/application-services/products/ssl/">SSL certificate</a> on CloudFlare's network that will accept HTTPS connections for a customer's domain and subdomains. Those certificates include an entry for the root domain (e.g., example.com) as well as a wildcard entry for all first-level subdomains (e.g., <a href="http://www.example.com">www.example.com</a>, blog.example.com, etc.).</p><p>For a site that did not have SSL before, we will default to our <a href="https://support.cloudflare.com/hc/en-us/articles/200170416-What-do-the-SSL-options-Off-Flexible-SSL-Full-SSL-Full-SSL-Strict-mean-">Flexible SSL mode</a>, which means traffic from browsers to CloudFlare will be encrypted, but traffic from CloudFlare to a site's origin server will not. We strongly recommend site owners install a certificate on their web servers so we can encrypt traffic to the origin. Later today we'll be publishing a blog with instructions on how to do that at no cost. Once you've installed a certificate on your web server, you can enable the <a href="https://support.cloudflare.com/hc/en-us/articles/200170416-What-do-the-SSL-options-Off-Flexible-SSL-Full-SSL-Full-SSL-Strict-mean-">Full or Strict SSL modes</a> which encrypt origin traffic and provide a higher level of security.</p>
    <div>
      <h3>Challenges</h3>
      <a href="#challenges">
        
      </a>
    </div>
    <p>CloudFlare operates at significant scale and we're growing very quickly. To make Universal SSL work at our scale we needed to ensure it wouldn't overwhelm our resources. We had two primary concerns:</p><ol><li><p>CPU load</p></li><li><p>IPv4 exhaustion</p></li></ol><p>Terminating <a href="https://www.cloudflare.com/learning/ssl/what-is-https/">HTTPS connections</a> requires more CPU load than terminating HTTP. The additional load varies depending on the particular cipher suite used. For instance, the cutting-edge cipher suite <a href="https://www.cloudflare.com/learning/dns/dnssec/ecdsa-and-dnssec/">ECDSA</a> imposes significantly less load on our systems as compared with a more traditional cipher suite based on RSA. As it happens, ECDSA also provides a number of performance and security benefits over older cipher suites. We've <a href="/ecdsa-the-digital-signature-algorithm-of-a-better-internet/">written in the past about the benefits of ECDSA</a> including the fact that it supports Perfect Forward Secrecy and faster SSL termination (and therefore faster page load times).</p><p>IPv4 termination is the other challenge of Universal SSL. The original implementation of SSL encrypted the host header. That meant you were limited to one certificate per <a href="https://www.cloudflare.com/learning/dns/glossary/what-is-my-ip-address/">IP address</a>. Given that CloudFlare controls a finite number of IP addresses, it would be impossible for us to dedicate a unique IP for every one of our millions of customers.</p>
    <div>
      <h3>Solution</h3>
      <a href="#solution">
        
      </a>
    </div>
    <p>These challenges required that, for free customers, we limit Universal SSL support to modern browsers. Modern browsers include support for ECDSA, where many legacy browsers do not. Modern browsers also support an extension to the SSL protocol called <a href="http://en.wikipedia.org/wiki/Server_Name_Indication">Server Name Indication (SNI)</a>. SNI sends the web site name (the equivalent of the host header) unencrypted, which allows us to return different certificates on an IP address depending on what customer's site is requested. This allows us to serve multiple customers' sites from the same IP.</p><p>Generally, if you're running a browser that is less than 6 years old, your browser is modern and Universal SSL on CloudFlare's free plans will work. The two biggest problem children legacy browsers are:</p><ol><li><p>Internet Explorer on Windows XP (or older)</p></li><li><p>Android pre-Ice Cream Sandwich</p></li></ol><p>We've been studying browser traffic for the last year in order to determine what percentage of requests come from browsers that qualify as modern. The answer varies widely depending on the region. Globally, more than 80% of requests come from modern browsers, and that percentage is growing quickly.</p><p>A recent test showed the percentage of requests in countries around the world that come from modern browsers. Iran is the worst region in the world with only 52.01% of requests coming from modern browsers. Antarctica is the best region in the world with 99.44% of requests coming from modern browsers. You can mouse over different regions to see the percentage of requests that come from modern browsers.</p><p>While Universal SSL on our free service requires a modern browser, CloudFlare's paid plans have always and will always support both modern and legacy browsers. In the coming months, because of the benefits of ECDSA certificates, we plan on offering paid users the option to return ECDSA certificates if we detect a modern browser, while reverting to RSA certificate if we detect a legacy browser.</p><p>If SSL is a must-have for you, we still recommend using a paid <a href="https://www.cloudflare.com/plans">CloudFlare plan</a> (which start as inexpensively as $20/month). If SSL is a nice-to-have, support on the free plan is likely sufficient to serve the vast majority visitors from most regions around the world. Note finally that Universal SSL does not disable your ability to accept unencrypted traffic. HTTP will continue to work as it always has before. You can, however, now use CloudFlare's Page Rules to force all traffic to HTTPS even if you're a free customer. (PS - Going forward, also we plan to support the ability to add HSTS headers.)</p>
    <div>
      <h3>Other benefits</h3>
      <a href="#other-benefits">
        
      </a>
    </div>
    <p>One additional benefit of Universal SSL is it allows us to broadly support of the SPDY protocol which requires an encrypted connection. SPDY improves web performance in a number of ways we've <a href="/what-makes-spdy-speedy/">written about before</a>. All CloudFlare customers will, by the end of the day today, also have SPDY enabled by default — massively increasing the size of the SPDY universe.</p><p>We also have plans to expand the universe of supported browsers slightly by taking advantage of connections that arrive over IPv6 for browsers that don't support SNI. About 16% of unique IP addresses that connect to CloudFlare do so via IPv6 (note: that calculation takes only the first 8 bytes as unique in any IPv6 address connecting to our network). Since IPv6 addresses are virtually infinite, we don't have the same limitations as we do with IPv4 and can therefore return a unique certificate for every IPv6 address.</p><p>Our bigger hope, however, is that Universal SSL will be yet another reason, along with <a href="http://googleonlinesecurity.blogspot.com/2014/09/gradually-sunsetting-sha-1.html">Google and Firefox deprecating SHA-1-signed certs</a> and Microsoft ceasing support for Windows XP, to encourage people to upgrade to a modern browser running on a modern OS. Sometimes progress requires sacrificing some backward compatibility. The good news here is that none of CloudFlare's current free customers supported any version of SSL previously, so the encrypted web tomorrow is only better and no worse.</p>
    <div>
      <h3>Encouraging Modern Browser Use</h3>
      <a href="#encouraging-modern-browser-use">
        
      </a>
    </div>
    <p>To that end, CloudFlare customers can help encourage the remaining users of old browsers to upgrade using a CloudFlare App. The <a href="https://www.cloudflare.com/apps/abetterbrowser">A Better Browser</a> app can be installed with one click on any web site that uses CloudFlare. It automatically detects if the visitor is using an old browser and adds a banner at the top of the page suggesting that they upgrade.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6RsdCzfWGDxKjRVhtnqnr9/85777edfb952a16bbc86161c75c8b494/example.png" />
            
            </figure>
    <div>
      <h3>The Internet is a Belief System</h3>
      <a href="#the-internet-is-a-belief-system">
        
      </a>
    </div>
    <p>Last Wednesday we had a CloudFlare Board meeting. We went over our plans for launching Universal SSL and how doing so may hurt our revenue given that SSL is one of the reasons people upgrade to a paid plan. But everyone on CloudFlare's Board was unanimous: even if it does hurt revenue in the short term, it's the right thing to do.</p><p><a href="http://www.usv.com/about#brad-burnham">Brad Burnham</a>, who is the partner at Union Square Ventures who led our last round of financing, reminded me during the meeting of the Joi Ito essay about how the <a href="http://joi.ito.com/weblog/2011/12/05/the-internet-in.html">Internet is a belief system</a>. Inherent to Joi's point is that small groups of people, working together, can create great things. That, fundamentally, is the Internet.</p><p>The team behind Netscape first introduced SSL back in February 1995, originally intended to facilitate <a href="https://www.cloudflare.com/ecommerce/">ecommerce</a> online. As the Internet grew in importance, governments, ISPs, and hackers began to intercept, throttle, and censor traffic as it flowed across the network to serve their ends. In response, SSL's importance expanded beyond ecommerce to help ensure a free and open web. As Google and the IETF work on the next generation Internet protocols like SPDY and HTTP/2, it's no wonder encryption is at their heart. And so, in order for CloudFlare to fulfill its mission of helping build a better Internet, we knew one of the most important things we could do was enable Universal SSL for all our customers — even if they don't pay us.</p><p>Having cutting-edge encryption may not seem important to a small blog, but it is critical to advancing the encrypted-by-default future of the Internet. Every byte, however seemingly mundane, that flows encrypted across the Internet makes it more difficult for those who wish to intercept, throttle, or censor the web. In other words, ensuring your personal blog is available over HTTPS makes it more likely that a human rights organization or social media service or independent journalist will be accessible around the world. Together we can do great things.</p><p>The Internet is a belief system. At CloudFlare, we're proud today that we're playing a part in helping advance that belief system. And, having proven that Universal SSL is possible at our scale, we hope many other organizations will follow in turning SSL on for all their customers and at no additional cost.</p>
    <div>
      <h3>#savetheweb</h3>
      <a href="#savetheweb">
        
      </a>
    </div>
    <p>If you are already a CloudFlare customer, we're rolling out Universal SSL throughout the day today. We expect it will be fully provisioned for most current customers within the next 24 hours. If you're a new customer, note that it will take up to 24 hours from when you <a href="https://www.cloudflare.com/sign-up">sign up</a> to provision SSL for our free service (and, again, if you're in a hurry, it's still instant for all paid plans).</p><p>One final note: if you signed up for CloudFlare through one of our hosting partners, it will be a bit longer before we can enable Universal SSL. This is due to a technical limitation on how we need to provision the Universal SSL certificates. We think we can solve the technical limitation and expect that we'll be able to support Universal SSL through partners before the end of the year. Until then, hang tight.</p>
    <div>
      <h3>Thanks</h3>
      <a href="#thanks">
        
      </a>
    </div>
    <p>This is a day the CloudFlare team has been looking forward to for the last three years. It took a ton of work. We couldn't have done it without the help of a number of great people both on our own team and at other organizations that provided assistance. Special thanks to <a href="https://www.globalsign.com/">Globalsign</a>, <a href="https://www.comodo.com/">Comodo</a>, <a href="http://unmitigatedrisk.com/">Ryan Hurst</a>, <a href="https://www.dubfire.net/">Christopher Soghoian</a> (ACLU), <a href="https://www.eff.org/about/staff/peter-eckersley">Peter Eckersley</a> (EFF), and <a href="https://www.imperialviolet.org/">Adam Langley</a> (Google).</p><p>Over the next few days, we'll be posting a series of articles about the details behind how we made Universal SSL a reality. There were a number of hard technical, business, and legal challenges we had to overcome to make today possible. The people that worked on solving them are excited to share their stories. Stay tuned.</p><p><b>Update:</b> <i>It's taking us a bit longer to provision Universal SSL for all our customers than we'd originally anticipated. We're now expecting the provisioning process to be complete on Thursday, October 2 @ 0700 UTC. We've published a </i><a href="/universal-ssl-be-just-a-bit-more-patient/"><i>new blog post</i></a><i> on how you can track our progress and what errors you may see if you try and visit your site over HTTPS before the provisioning process is complete.</i></p> ]]></content:encoded>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[spdy]]></category>
            <category><![CDATA[HTTPS]]></category>
            <category><![CDATA[Universal SSL]]></category>
            <category><![CDATA[SSL]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">580xgry1No70EG2dqtUm22</guid>
            <dc:creator>Matthew Prince</dc:creator>
        </item>
        <item>
            <title><![CDATA[The Web's Silver Jubilee]]></title>
            <link>https://blog.cloudflare.com/the-webs-silver-jubilee/</link>
            <pubDate>Tue, 11 Mar 2014 17:00:00 GMT</pubDate>
            <description><![CDATA[ No matter what your age, it's hard to believe that the World-Wide Web is 25 today. For the young the web has always been part of their lives, for the older it seems like it was invented only yesterday. ]]></description>
            <content:encoded><![CDATA[ <p>No matter what your age, it's hard to believe that the World-Wide Web is 25 today. For the young the web has always been part of their lives, for the older it seems like it was invented only yesterday. But, in truth, the World-Wide Web sprang into life in the form of a document circulated at CERN entitled <a href="http://www.w3.org/History/1989/proposal.html">Information Management: A Proposal</a> in March 1989.</p><p>The document contains a simple diagram proposing that "browsers" on heterogenous machine types would be able to access Hypertext Servers to view information.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/58uUWe37WW6ZNme2exf8Qq/0b174eb470b5c75bcc9280212eeb03b1/Image2.gif" />
            
            </figure><p>In one of the great understatements of computing history, Tim Berners-Lee, the author of the proposal, wrote a parenthetical comment that allowing heterogenous machine types to access these proposed Hypertext Servers would be "a boon for the world in general".</p><p>The most visible part of the explosion of the World-Wide Web is that we are all using it every day. But we don't often stop to think about the technical changes that underlie the web browsers that we use. Part of CloudFlare's work is to stay on top of the web as it changes so that everyone with a web server has the latest technology.</p><p>Here's a brief timeline of significant changes in web technology.</p><p>March 12, 1989: Tim Berners-Lee outlines the web in "Information Management: A Proposal"</p><p>Christmas Day, 1990: Berners-Lee releases the first version of his <a href="https://en.wikipedia.org/wiki/WorldWideWeb">WorldWideWeb</a> web browser.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5mV942cgsoa2R2LVn8yPSo/6c1a4fe2034c3ceec22b0ad7c46b7ac2/screensnap2_24c.gif" />
            
            </figure><p>1991: the first HTTP standard <a href="http://www.w3.org/Protocols/HTTP/AsImplemented.html">HTTP/0.9</a> is written up. It reflects that state of HTTP as implemented by early web browsers.</p><p>March 9, 1992: The <a href="https://en.wikipedia.org/wiki/ViolaWWW">ViolaWWW</a> browser is released. It remains popular until Mosaic is released.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1WEa2MqP4DgnpzCeOYP6Xg/5435fac05bdf35692c4b3218d8bcfc90/ViolaWWW.png" />
            
            </figure><p>July 1992: Port 80 is assigned for the HTTP protocol in <a href="https://www.ietf.org/rfc/rfc1340.txt">RFC 1340</a>.</p><p>November 3, 1992: Internal CERN document entitled <a href="http://www.w3.org/History/19921103-hypertext/hypertext/WWW/MarkUp/Tags.html">HTML Tags</a> is first HTML specification of any kind.</p><p>January 23, 1993: The <a href="https://en.wikipedia.org/wiki/Mosaic_(web_browser)">Mosaic</a> web browser is released and becomes very popular.</p><p>February 25, 1993: <a href="http://1997.webhistory.org/www.lists/www-talk.1993q1/0182.html">Marc Andreessen proposes</a> that the web should have an <code>&lt;img&gt;</code> tag so that images could be displayed in a browser along with text.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/JqVP9q7Z4X2XzqSXLNsEC/1230d6bf8c9c0c74272ef44231a9cc02/Mosaic_Netscape_0.9_on_Windows_XP.png" />
            
            </figure><p>1994: The first mobile web browser, PocketWeb for the Apple Newton, is released.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7npSwGp9mp94ThnLthCrMU/5f26a2ee4a942a0cf9698386fe35d40f/url.gif" />
            
            </figure><p>February 1995: Netscape <a href="https://web.archive.org/web/19970614020952/http://home.netscape.com/newsref/std/SSL.html">introduced SSL</a> for secure HTTP connections.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/68m0R3utBQaJnOboHEHicW/5c72e5c81d51cdac0fdc9436f65beeec/tumblr_l2l2c7PQqa1qzqua1o1_500.jpg" />
            
            </figure><p>September 1995: Netscape introduces <a href="https://en.wikipedia.org/wiki/JavaScript">JavaScript</a>.</p><p>November 24, 1995: HTML 2.0 is described in <a href="https://tools.ietf.org/html/rfc1866">RFC 1866</a>.</p><p>1996: Macromedia introduces <a href="http://en.wikipedia.org/wiki/Adobe_Flash">Flash</a>. It becomes Adobe Flash in 2005.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/qA3PosbakbVIBbXYqTDDt/050a5c772572ec3f1276486a13eca51b/befor-flash1.png" />
            
            </figure><p>May 1996: The specification for <a href="http://www.ietf.org/rfc/rfc1945.txt">HTTP/1.0</a> is released as RFC 1945.</p><p>November 1996: SSL 3.0 is released (it is described in <a href="https://tools.ietf.org/html/rfc6101">RFC 6101</a>). The W3C issues a <a href="http://www.w3.org/TR/WD-xml-961114.html">Working Draft</a> describing XML.</p><p>December 17, 1996: CSS Level 1 is published as a <a href="http://www.w3.org/TR/CSS1/">recommendation</a> by the W3C.</p><p>January 1997: The specification for <a href="http://www.ietf.org/rfc/rfc2068.txt">HTTP/1.1</a> is released as RFC 2068. The W3C releases a draft specification for <a href="http://www.w3.org/TR/REC-html32">HTML 3.2</a>.</p><p>December 18, 1997: The specification for <a href="http://www.w3.org/TR/REC-html40-971218/">HTML 4.0</a> is released.</p><p>1998: Microsoft introduces <a href="http://www.alexhopmann.com/xmlhttp.htm">XMLHTTP</a> as part of work being done on <a href="https://en.wikipedia.org/wiki/Outlook_Web_App">Outlook Web Access</a>. XMLHTTP later became XMLHTTPRequest and helped kick off Web 2.0.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4np2lJkLEfZMTdXrIb407C/5af83ebaa2c88dc5e0e0856bf62367c3/OWA_2000_interface.gif" />
            
            </figure><p>May 12, 1998: W3C publishes a specification for <a href="http://www.w3.org/TR/2008/REC-CSS2-20080411/">CSS Level 2</a>.</p><p>December 1998: IPv6 is written up in <a href="https://tools.ietf.org/html/rfc2460">RFC 2460</a>. The specification of <a href="http://www.w3.org/TR/html401/">HTML 4.01</a> is released.</p><p>January 1999: TLS 1.0 is described in <a href="https://tools.ietf.org/html/rfc2246">RFC 2246</a>. It is destined to replace SSL.</p><p>December 2000: Mozilla introduces support for XMLHTTPRequest in Gecko 0.6.</p><p>February 2004: Apple adds support for XMLHTTPRequest to Safari 1.2.</p><p>February 18, 2005: The term AJAX is used to <a href="http://www.adaptivepath.com/ideas/ajax-new-approach-web-applications/">describe</a> dynamic web sites using XMLHTTPRequest and JavaScript.</p><p>April 2006: TLS 1.1 is described in <a href="https://tools.ietf.org/html/rfc4346">RFC 4346</a>. The W3C releases a <a href="http://www.w3.org/TR/2006/WD-XMLHttpRequest-20060405/">Working Draft</a> describing XMLHTTPRequest.</p><p>October 2006: Microsoft Internet Explorer 7 supports XMLHTTPRequest.</p><p>January 2008: First draft version of <a href="http://www.w3.org/TR/html5/">HTML 5</a> is released.</p><p>August 2008: TLS 1.2 is described in <a href="https://tools.ietf.org/html/rfc5246">RFC 5246</a>.</p><p>April 12, 2011: <a href="http://www.w3.org/TR/2011/PR-CSS2-20110412/">CSS Level 2.1</a> becomes a W3C Proposed Recommendation.</p><p>November 2011: <a href="http://dev.chromium.org/spdy/spdy-whitepaper">SPDY</a> is introduced by Google.</p><p>December 2011: <a href="http://tools.ietf.org/html/rfc6455">RFC 6455</a> describes <a href="http://en.wikipedia.org/wiki/WebSocket">WebSockets</a>.</p><p>February 2012: SPDY Version 3 is <a href="http://tools.ietf.org/html/draft-mbelshe-httpbis-spdy-00">described</a> an Internet Draft.</p><p>November 2013: SPDY Version 3.1 is <a href="http://www.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3-1">specified</a>. Work on SPDY continues as part of <a href="http://en.wikipedia.org/wiki/HTTP_2.0">HTTP/2.0</a>.</p><p>And so the web continues to evolve. New specifications and new protocols are tested and defined. HTML5 is an ongoing effort, as is <a href="https://en.wikipedia.org/wiki/Cascading_Style_Sheets#CSS_3">CSS Level 3</a>. Google recently began experimenting with a new web protocol called <a href="/staying-up-to-date-with-the-latest-protocols-spdy-3-1">QUIC</a>.</p><p>CloudFlare helps customers stay on top of the ever changing web with features like <a href="/introducing-cloudflares-automatic-ipv6-gatewa">automatic IPv6</a>, support for <a href="/staying-up-to-date-with-the-latest-protocols-spdy-3-1">SPDY/3.1</a>, and complete support for <a href="/introducing-strict-ssl-protecting-against-a-man-in-the-middle-attack-on-origin-traffic">TLS</a>.</p><p>25 years on the web is still growing, evolving and changing. Here's to 25 more years!</p><p>PS If reading that list of changes wasn't enough nostalgia for you... <a href="http://info.cern.ch/hypertext/WWW/TheProject.html">visit the web page that got it all started</a>.</p><p>When Tim Berners-Lee wrote the original proposal he sent it to his boss. His boss wrote on the top of it <a href="http://info.cern.ch/Proposal.html">Vague but exciting...</a>. It did turn out to be the latter!</p> ]]></content:encoded>
            <category><![CDATA[History]]></category>
            <category><![CDATA[spdy]]></category>
            <category><![CDATA[TLS]]></category>
            <category><![CDATA[SSL]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">7mndyDQaIXvpdixV119Gfe</guid>
            <dc:creator>John Graham-Cumming</dc:creator>
        </item>
        <item>
            <title><![CDATA[Staying up to date with the latest protocols: SPDY/3.1]]></title>
            <link>https://blog.cloudflare.com/staying-up-to-date-with-the-latest-protocols-spdy-3-1/</link>
            <pubDate>Mon, 17 Feb 2014 16:00:00 GMT</pubDate>
            <description><![CDATA[ Back in June 2012 CloudFlare started a beta rollout of Google's then new SPDY protocol and we took a detailed look at how SPDY makes web sites faster. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Back in June 2012 CloudFlare started a <a href="/introducing-spdy">beta rollout</a> of Google's then new <a href="http://en.wikipedia.org/wiki/SPDY">SPDY</a> protocol and we took a <a href="/what-makes-spdy-speedy">detailed look</a> at how SPDY makes web sites faster.</p><p>Since then we've watched carefully as SPDY has evolved through different versions and have been keeping an eye on a new Google-driven protocol called <a href="http://en.wikipedia.org/wiki/QUIC">QUIC</a>. In August 2012 we <a href="/spdy-now-one-click-simple-for-any-website">rolled out SPDY</a> for all our customers by making it a simple (one click) configuration option.</p><p>As SPDY has progressed we've become more and more confident in the protocol and made it automatic for all our Pro, Business and Enterprise customers. No click needed. (Since SPDY runs over SSL/TLS to use it a web site must have an <a href="https://www.cloudflare.com/application-services/products/ssl/">SSL certificate</a>).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2PpchE7eOhRAjW1Oi7wL7c/ba229bb4051630fed5c4923065197e63/Screen_Shot_2014-02-18_at_10.00.09.png" />
            
            </figure><p>Last week we rolled out the most recent version of SPDY, 3.1, for all customers. SPDY/3.1 is supported by Google Chrome and Mozilla Firefox. As older versions of SPDY (particularly SPDY/2) are being deprecated it's vital for us to keep up to date.</p><p>To see whether a site is served over SPDY it's possible to use the CloudFlare <a href="https://chrome.google.com/webstore/detail/claire/fgbpcgddpmjmamlibbaobboigaijnmkl">Claire</a> extension for Google Chrome. Here it's showing that the popular <a href="https://news.ycombinator.com/">Hacker News</a> site is served over SPDY.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/jsIJ2FU6I4dxoEVHtn4zj/908a09be427f3171d90a7b4223d4e2fa/Screen_Shot_2014-02-18_at_10.36.01.png" />
            
            </figure><p>To discover the exact version used you can dive into Chrome's <a>chrome://net-internals</a> where the version is shown for each connection. Here connections to Google, CloudFlare and Hacker News are all using the latest version.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3s8Y75eF7NDiyE2Un8PpCU/c0bf780210d14bf8844e6856e6a80da0/Screen_Shot_2014-02-18_at_07.48.33.png" />
            
            </figure>
    <div>
      <h3>What changed in SPDY/3 and SPDY/3.1</h3>
      <a href="#what-changed-in-spdy-3-and-spdy-3-1">
        
      </a>
    </div>
    <p>A key advantage of SPDY is its ability to multiplex many HTTP request streams onto a single TCP connection. In the past, various hacks (such as <a href="/using-cloudflare-to-mix-domain-sharding-and-spdy">domain sharding</a>) have been used to get around the fact that only sequential, synchronous requests were possible with HTTP over TCP. SPDY changed all that.</p><p><a href="http://www.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3">SPDY/3</a> introduced <a href="http://en.wikipedia.org/wiki/Flow_control_(data)">flow control</a> so that SPDY clients (and servers) could control the amount of data they receive on a SPDY connection. <a href="http://www.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3-1">SPDY/3.1</a> extended flow control to individual SPDY streams (each SPDY connection handles multiple simultaneous streams of data). Flow control is important because different clients (think of the differences in available memory in laptops, desktops and mobile phones) will have varying limitations on how much data they can receive at any one time.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/65Q11v5zJ1nBrsBJAYYl7x/d19997a15bcbbfe80e5b7268aedb6a5a/9739472905_4dd2992b6c_c.jpg" />
            
            </figure>
    <div>
      <h3>Protocols coming QUIC and fast</h3>
      <a href="#protocols-coming-quic-and-fast">
        
      </a>
    </div>
    <p>Part of the service CloudFlare provides is being on top of the latest advances in Internet and web technologies. We've stayed on top of SPDY and will continue to roll out updates as the protocol evolves (and we'll support HTTP/2 just as soon as it is practical).</p><p>The most recent web protocol we've started experimenting with is QUIC. QUIC is radically different from HTTP or SPDY because it uses UDP as its underlying transport. Currently, we have an internal QUIC server running serving a static version of the CloudFlare home page. As our experiments with QUIC progress we'll make an alpha site available for people who, like us, are interested in experimenting with bleeding edge technologies.</p><p>If you're interested in playing with QUIC today you'll need to build the test <a href="https://code.google.com/p/chromium/codesearch#chromium/src/net/tools/quic/&amp;ct=rc&amp;cd=2&amp;q=quic&amp;sq=package:chromium">QUIC server and client</a> that are part of the <a href="http://www.chromium.org/">Chromium</a> project, get <a href="https://www.google.co.uk/intl/en/chrome/browser/canary.html">Google Chrome Canary</a> and enable QUIC in <a>chrome://flags</a>. You'll probably also want the latest <a href="http://www.wireshark.org/download.html">Wireshark</a> (the development release) which is capable of decoding QUIC frames.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1YkDhnZrbBRzcJDyG9jprc/487e5f62fc83d51cdf227ebd74d0f134/Screen_Shot_2014-02-17_at_13.01.26.png" />
            
            </figure><p>And once QUIC makes the move from experimental to beta we'll be sure to make it available for our customers.</p> ]]></content:encoded>
            <category><![CDATA[Google]]></category>
            <category><![CDATA[spdy]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Claire]]></category>
            <category><![CDATA[QUIC]]></category>
            <guid isPermaLink="false">7vzWPpCYEy8qZe6HioMhFv</guid>
            <dc:creator>John Graham-Cumming</dc:creator>
        </item>
        <item>
            <title><![CDATA[Using CloudFlare to mix domain sharding and SPDY]]></title>
            <link>https://blog.cloudflare.com/using-cloudflare-to-mix-domain-sharding-and-spdy/</link>
            <pubDate>Thu, 26 Dec 2013 17:00:00 GMT</pubDate>
            <description><![CDATA[ It’s common knowledge that domain sharding, where the resources in a web page are shared across different domains (or subdomains), is a good thing.  ]]></description>
            <content:encoded><![CDATA[ <p><i>Note: this post originally appeared as part of the </i><a href="http://calendar.perfplanet.com/2013/"><i>2013 PerfPlanet Calendar</i></a></p><p>It’s common knowledge that domain sharding, where the resources in a web page are shared across different domains (or subdomains), is a good thing. It’s a good thing because browsers limit the number of connections per domain: splitting a web page across domains means more connections and hence faster page downloads. Overall domain sharding results in a better end-user experience, and can be a useful way of sharing load across web servers.</p><p>But with the adoption of Google’s SPDY protocol the domain sharding situation is totally different. In fact, domain sharding can hurt performance when SPDY is in use and isn’t <a href="http://www.chromium.org/spdy/spdy-best-practices">recommended</a>. To understand why, here’s the popular 4chan.org web site downloaded without SPDY but using SSL (it’s possible to do this comparison without SSL, but less interesting because the timings are very different).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4ujkST6m884tzfzwb11KJx/1fb5571fe8c36739468aa4f3332374e3/jgc6.png" />
            
            </figure><p>You can see that there are three domains involved: <a href="http://www.4chan.org">www.4chan.org</a> (from which the initial HTML is downloaded), s.4cdn.org and t.4cdn.org. 4chan is using two domains to shard resources like JavaScript, CSS and images. After the initial HTML is downloaded on line 1, the browser (I used IE 10 here) looks up the DNS entry for s.4cdn.org and t.4cdn.org and opens three connections to each (lines 2 to 7).</p><p>In the diagram above the orange represents the TCP connection, and the purple the SSL negotiation. After using those 6 connections to download a resource, the same connections are reused (classic HTTP/1.1 Keep-Alive behaviour) to get further resources. Finally, line 16, there’s a separate connection to send Google Analytics information.</p><p>Now take a look at the same site downloaded using SPDY/2 via Google Chrome.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6quofHrSSDVAzXegbsAY5a/97b9764e6e898b42e0e57eb112de849f/jgc8.png" />
            
            </figure><p>Line 1 shows the same sort of connection, SSL negotiation and download of the page (here it took 591ms to complete vs. 549 ms above). But then the behaviour is totally different. Line 2 shows a single TCP connection and single SSL negotiation to s.4cdn.org. That connection is then used to download all the resources for s.4cdn.org and t.4cdn.org in parallel. Finally, there’s the same, separate Google Analytics connection. What you’re seeing there is SPDY in action.</p><p>The SPDY version was slightly faster: the page was visually complete at 1.1s; with SSL without SPDY it was 1.3s (although you’d have to account for differences in paint time between IE 10 and Chrome to really understand those values). There are two important things happening in the SPDY version:</p><p>Firstly, Chrome has noticed that s.4cdn.org and t.4cdn.org are the same site (they have the same IP addresses and the certificate for s.4cdn.org is valid for t.4cdn.org as well: it’s a wildcard certificate for 4cdn.org) and so it doesn’t bother with separate SSL connection: one will do. It then requests resources from each of those domains across the same SPDY connection. To do that it simply specifies the correct Host in the SPDY request. These can be see in the chrome://net-internals view. Here are two requests on the same SPDY connection for different Hosts.</p><p>t=1386958552557 [st=  1]    SPDY_SESSION_SYN_STREAM
--&gt; fin = true
--&gt; accept: */*
accept-encoding: gzip,deflate,sdch
accept-language: en-US,en;q=0.8,fr;q=0.6
cache-control: no-cache
host: s.4cdn.org
method: GET
pragma: no-cache
referer: <a href="https://www.4chan.org/">https://www.4chan.org/</a>
scheme: https
url: /js/fp-combined-compiled.7.js
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36
version: HTTP/1.1
--&gt; stream_id = 5
--&gt; unidirectional = false
t=1386958552577 [st= 21]    SPDY_SESSION_SYN_STREAM
--&gt; fin = true
--&gt; accept: image/webp,*/*;q=0.8
accept-encoding: gzip,deflate,sdch
accept-language: en-US,en;q=0.8,fr;q=0.6
cache-control: no-cache
host: t.4cdn.org
method: GET
pragma: no-cache
referer: <a href="https://www.4chan.org/">https://www.4chan.org/</a>
scheme: https
url: /cgl/thumb/1386957763148s.jpg
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36
version: HTTP/1.1
--&gt; stream_id = 7
--&gt; unidirectional = false</p><p>So, Chrome has detected that these domains are actually the same machine and made a single connection. That’s great, and doesn’t have a performance impact, but the actual decision to shard at all has had an impact.</p><p>Secondly, notice how in the SPDY case there are two TLS negotiations (one for <a href="http://www.4chan.org">www.4chan.org</a> and one for s.4cdn.org). The site could have loaded much faster if all the resources had been on <a href="http://www.4chan.org">www.4chan.org</a> (or on domains that shared a certificate; for this reason wildcard certificates work well with SPDY connections because the browser can use a single shared connection) because the entire download could have been done in a SPDY connection. Because 4chan uses a special domain (on a different IP with a different certificate) for resources it’s necessary to set up a new connection. In the example above, all the resources have to wait for a DNS lookup (27 ms), TCP connection (29 ms) and SSL negotiation (71 ms) before the SPDY connection can start requesting them. That’s a total of 127 ms. The page was visually complete in 1100 ms; if a single domain had been used then SPDY would have saved another 127 ms (almost 12% of the time).</p><p>So, for SPDY it’s actually better to not shard; for non-SPDY domain sharding remains a useful technique. (If you are interested in the actual test data the IE 10/SSL test is <a href="http://www.webpagetest.org/result/131213_FK_QC1/">http://www.webpagetest.org/result/131213_FK_QC1/</a> and the Chrome/SPDY test is <a href="http://www.webpagetest.org/result/131213_NE_QCQ/">http://www.webpagetest.org/result/131213_NE_QCQ/</a>).</p>
    <div>
      <h3>The best of both worlds</h3>
      <a href="#the-best-of-both-worlds">
        
      </a>
    </div>
    <p>The question then becomes, can you have the best of both worlds? With a little DNS trickery it’s possible to set up a site that works well whether SPDY is available or not. Since I don’t have access to 4chan to do live experiments, I copied the <a href="http://www.4chan.org">www.4chan.org</a> home page and all the included resources to my own web server and set up three domains: r.jgc.org (the root domain), s.jgc.org (equivalent to s.4cdn.org) and t.jgc.org (equivalent to t.4cdn.org). I then manually edited the HTML and CSS so that all the linked resources pointed to either s.jgc.org and t.jgc.org in the same manner as the original 4chan site. But, critically, I used a single certificate for all three domains. Here’s the site being loaded using IE 10 over SSL.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/36hLzFeZOJ8i7mdm7MP6Hf/33556c46922a0a2e7a649c6c64893fe7/jgc2.png" />
            
            </figure><p>And here’s the site loaded using Chrome with SPDY.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7gD8cltZjtCKvomgdCgtF1/8e19d99bada976cf600b34cf849b641d/jgc4.png" />
            
            </figure><p>As you can see, the domain sharding worked in IE 10. There are multiple connections to the s.jgc.org and t.jgc.org domains downloading resources in parallel. And the same configuration worked for Chrome with SPDY because it detected that these shared a certificate and used a single SPDY connection for everything (including the initial page download).</p><p>In Chrome there was only a single TCP connection and a single DNS lookup needed despite the presence of three domains. The IE 10/SSL version was visually complete in 1100 ms and used 9 TCP/SSL connections (plus one extra for Google Analytics). The Chrome/SPDY version was visually complete 200ms (at 900ms) and used… a single SPDY connection (plus an extra connection for Google Analytics). If you’re interested the IE 10/SSL test is <a href="http://www.webpagetest.org/result/131213_NP_TB3/">here</a> and the Chrome/SPDY test is <a href="http://www.webpagetest.org/result/131213_ZP_TBY/">here</a>.</p><p>For the best performance for the older browsers and the latest, shiny SPDY browsers domain sharding should still be used but using a certificate that covers the domains used means that only a single SPDY connection will be needed.</p><p>CloudFlare Makes This EasyCloudFlare has both <a href="https://www.cloudflare.com/features-security">simple SSL</a> options and <a href="https://www.cloudflare.com/features-cdn">push button SPDY</a> available. By setting up SSL on CloudFlare with subdomains you'll automatically get SPDY as well. In the test above it took me about 10 minutes to set up the test subdomains on jgc.org and enable both SSL and SPDY.</p>
    <div>
      <h3>Thanks</h3>
      <a href="#thanks">
        
      </a>
    </div>
    <p>Thanks to Andrew Galloni for his assistance reviewing and investigating the interaction between SPDY and domain sharding.</p> ]]></content:encoded>
            <category><![CDATA[TLS]]></category>
            <category><![CDATA[Google]]></category>
            <category><![CDATA[Chrome]]></category>
            <category><![CDATA[spdy]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">4DLn2kM9SaXhB138yI9EFd</guid>
            <dc:creator>John Graham-Cumming</dc:creator>
        </item>
        <item>
            <title><![CDATA[Do you want to work with Go?]]></title>
            <link>https://blog.cloudflare.com/do-you-want-to-work-with-go/</link>
            <pubDate>Sun, 18 Nov 2012 00:35:00 GMT</pubDate>
            <description><![CDATA[ It's no secret that CloudFlare has adopted Go for some production systems; we've written about our use of Go in the past. But over time it's become clear to us that Go is an important language for the sort of high-performance, highly-concurrent software we have to write. ]]></description>
            <content:encoded><![CDATA[ <p>It's no secret that CloudFlare has adopted Go for some production systems; we've <a href="/go-at-cloudflare">written about our use of Go</a> in the past. But over time it's become clear to us that Go is an important language for the sort of high-performance, highly-concurrent software we have to write. And the Go package library contains pretty much everything we need to write small, fast programs (and write them quickly).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2Zkho3zft3LzfbcrGe6Cfh/221c619fee460d1182ca44dd7905ca0a/IMG_4122.JPG.scaled500.jpg" />
            
            </figure><p>So, Go has become an important part of CloudFlare Engineering.</p><p>And because of that we are actively hiring for people who know Go or want to learn it. We'll soon be open sourcing some of our Go programs and want to find more people to work on our Go code base.</p><p>We're currently using Go for PKI tools, our <a href="/cacheing-the-uncacheable-cloudflares-railgun-73454">Railgun web optimizer</a>, a new high-performance DNS server and <a href="https://github.com/mtourne/gurl">a curl-like tool for SPDY</a>. And we've <a href="http://www.meetup.com/golangsf/events/74897362/">hosted the GoSF</a> meetup in the past.</p><p>So, if you're interested in writing Go code, contributing to Golang itself and having your code go into production against billions of page views per day, <a href="http://www.cloudflare.com/join-our-team">get in touch</a>.</p> ]]></content:encoded>
            <category><![CDATA[Life at Cloudflare]]></category>
            <category><![CDATA[spdy]]></category>
            <category><![CDATA[Railgun]]></category>
            <category><![CDATA[Careers]]></category>
            <category><![CDATA[Go]]></category>
            <guid isPermaLink="false">3kDhenjHwvnvCYABdksU5w</guid>
            <dc:creator>John Graham-Cumming</dc:creator>
        </item>
        <item>
            <title><![CDATA[SPDY Now One-Click Simple for Any Website]]></title>
            <link>https://blog.cloudflare.com/spdy-now-one-click-simple-for-any-website/</link>
            <pubDate>Thu, 02 Aug 2012 22:34:00 GMT</pubDate>
            <description><![CDATA[ About a month and a half ago, CloudFlare announced limited support for SPDY as part of a private beta. SPDY is the new protocol pioneered by Google to make the web faster. If you're curious, we've written about what makes SPDY speedy in previous blog posts.

 ]]></description>
            <content:encoded><![CDATA[ <p></p><p>About a month and a half ago, CloudFlare announced <a href="/introducing-spdy">limited support for SPDY</a> as part of a private beta. SPDY is the new protocol pioneered by Google to make the web faster. If you're curious, we've written about <a href="/what-makes-spdy-speedy">what makes SPDY speedy</a> in previous blog posts.</p><p>Since that announcement, we've been testing SPDY with a couple hundred of CloudFlare's customers, as well as on <a href="https://www.cloudflare.com/">CloudFlare.com</a> itself, in a private beta. The results have been great and today we're excited to announce that SPDY is now available to any eligible CloudFlare customer from theirPerformance Settings page.</p>
    <div>
      <h3>Who Gets Speedy?</h3>
      <a href="#who-gets-speedy">
        
      </a>
    </div>
    <p>The current implementation of SPDY requires TLS/SSL. As a result, SPDY is only supported for paying CloudFlare customers who have SSL enabled. Even if you don't have your own <a href="https://www.cloudflare.com/application-services/products/ssl/">SSL certificate</a> installed on your server, you can take advantage of SPDY by enabling <a href="/easiest-ssl-ever-now-included-automatically-w">CloudFlare's Flexible SSL</a>. If you're a Free customer, you can <a href="http://www.cloudflare.com/plans">upgrade to one of CloudFlare's paid plans</a> and enable SPDY immediately. If, in the future, the SPDY protocol supports non-HTTPS connections, we plan to extend SPDY support to Free customers as well.</p><p>Assuming you have SSL enabled, you can turn SPDY on with a single click for all traffic that passes through CloudFlare. SPDY will automatically be enabled for HTTPS traffic to browsers like Chrome and the latest version of Firefox which supports the protocol.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/epjjB1FZ44ddIWcN9oNky/bbd8af02180c375f4abd666b08fbbda9/spdy_setting.jpeg.scaled500.jpg" />
            
            </figure><p>With widespread SPDY support, we're excited to continue to push the web forward as we continue our mission of building a faster, safer Internet.</p> ]]></content:encoded>
            <category><![CDATA[Chrome]]></category>
            <category><![CDATA[Firefox]]></category>
            <category><![CDATA[spdy]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <guid isPermaLink="false">6IA4lpm5kazWmAyb9SfGen</guid>
            <dc:creator>Matthew Prince</dc:creator>
        </item>
        <item>
            <title><![CDATA[How to make SSL fast]]></title>
            <link>https://blog.cloudflare.com/how-cloudflare-is-making-ssl-fast/</link>
            <pubDate>Fri, 29 Jun 2012 02:15:00 GMT</pubDate>
            <description><![CDATA[ HTTP, the protocol of the web, is unencrypted by default. That means it is trivial for someone using the same local network as you to spy on all the data you send to and receive from most websites.  ]]></description>
            <content:encoded><![CDATA[ <p>HTTP, the protocol of the web, is unencrypted by default. That means it is trivial for someone using the same local network as you to spy on all the data you send to and receive from most websites. If, for example, someone sniffs your session cookie for a website then they can install it themselves and log in as if they were you without knowing your password. One high profile example was when actor <a href="http://www.huffingtonpost.com/2011/03/02/ashton-kutcher-twitter-hacked_n_830619.html">Ashton Kutcher's Twitter session cookie was sniffed off the TED conference's wifi network</a>, allowing a hacker to take control of his Twitter account.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3OIpYAf5gSb7J12tffxHPR/5a44292a36dd95a531eb6c47bda818e8/we_love_ssl.png.scaled500.png" />
            
            </figure><p>The solution to problems like Ashton's is to use an encrypted HTTPS connection which requires a website to support SSL. The problem is that the SSL protocol imposes a heavy burden. I'm fairly technically savvy and still find the process of installing and maintaining SSL keys on a web server Byzantine. SSL sessions also add considerable CPU load to web servers and slow down web performance.</p><p>CloudFlare is the web performance <i>and</i> security company. For security, we believe it is incumbent on us to make SSL easier and more widely deployed. Given that, in order to maximize performance, we are spending significant resources in order to improve the performance of SSL.</p>
    <div>
      <h3>What Makes SSL Slow?</h3>
      <a href="#what-makes-ssl-slow">
        
      </a>
    </div>
    <p>SSL imposes an additional tax on web performance, but it's important to understand exactly how. The primary source of the SSL performance tax comes from the initial setup of a new connection. Before any web page data can be exchanged, a SSL session must be "negotiated" between the client and the server. A simplified version of this process is as follows.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7qw0GzK3LEAQJhgAzEj8qH/c0a07000c380a43afe64e61832497323/SSL_session_negotiation.png.scaled500.png" />
            
            </figure><p>If you have multiple resources on your web page under different domains, your visitors' browsers will need to negotiate an SSL session for each domain. Because each SSL session requires at least 4 additional exchanges, the <a href="/the-bandwidth-of-a-boeing-747-and-its-impact">problems of flakey connections with high loss rates</a> (e.g., <a href="/why-mobile-performance-is-difficult">connections to mobile devices</a>) are amplified over HTTPS.</p>
    <div>
      <h3>OCSP &amp; CRL: Hidden Vampires</h3>
      <a href="#ocsp-crl-hidden-vampires">
        
      </a>
    </div>
    <p><a href="https://www.cloudflare.com/application-services/products/ssl/">SSL certificates </a>are issued by a certificate authority (CA). The CA attests that the website behind the certificate is who they say they are. Sometimes, after a certificate is issued, it is lost or compromised and needs to be revoked. CAs maintain a list of certificates that have been revoked, known as a Certificate Revocation List (CRL). Browsers, when they access a SSL-protected site, can query to download a CA's CRL and parse the list to see if a particular site is on it. Alternatively, they can issue a request via the Online Certificate Status Protocol (OCSP) to check if a particular site has had its certificate revoked.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6Xs4W7wZZ7iObBu9fYpu8d/98e9e755602900133a9c474721881890/revoked_cert.png.scaled500.png" />
            
            </figure><p>The problem is, for most CAs CRL and OCSP performance appears to be an afterthought. The CRL and OCSP servers are also not typically geographically distributed or tuned for performance. Verisign, one of the largest CAs, averages nearly <a href="http://unmitigatedrisk.com/?p=147">300ms to respond to a OCSP request</a>. That inherently means an additional third of a second gets added to your page load time for any visitor connecting to your site if you're using Verisign's SSL. To add insult to injury, most CAs don't yet accept IPv6 requests to their CRL or OCSP servers.</p><p>The problem of CRL and OCSP slowness is a significant enough impact on SSL performance that browser vendors have begun to <a href="http://www.imperialviolet.org/2012/02/05/crlsets.html">discuss removing the verifications entirely</a>. While that may help performance, it would hurt overall web security and make it harder to reliably trust a site's SSL.</p>
    <div>
      <h3>More SSL Sluggishness</h3>
      <a href="#more-ssl-sluggishness">
        
      </a>
    </div>
    <p>A number of other factors further contribute to SSL's overall slowness. Often certificates are chained using a number of intermediate certificates, which can increase the amount of data that needs to be exchanged during the initial session negotiation. Most sites haven't taken the time to optimize their crypto cypher. Choosing a crypto cypher that is too weak can subject your site to a number of potential vulnerabilities. On the other hand, choosing a stronger cypher can add load if your site is already CPU bound.</p><p>Overall, we regularly hear from customers who want to have SSL protection on their sites but find it either too difficult or to resource intensive. The end result is that many sites that should use SSL don't, sacrificing security for performance. And, for those sites that do support SSL, it is often implemented in a way that causes a significant performance penalty. Neither case is good for the web, so we wanted to see what we could do to help fix the problem.</p>
    <div>
      <h3>Speeding Up SSL</h3>
      <a href="#speeding-up-ssl">
        
      </a>
    </div>
    <p>CloudFlare is working on a number of initiatives to speed up SSL. First, we have a number of techniques to limit the number of connections that a browser needs to make and therefore reduce the number of session initiation handshakes that need be made. Rocket Loader, for example, <a href="/how-cloudflare-rocket-loader-redefines-the-modern-cdn/">combines requests for scripts</a>, even across third party services, into a single connection under a site's own domain. We're also <a href="/introducing-spdy">rolling out support for SPDY for all SSL-enabled sites</a>, which allows requests to be multiplexed across a single connection.</p><p>Beyond reducing the number of connections to improve SSL performance, we're working with Globalsign, our primary CA, to speed up CRL and OCSP. Today, Globalsign's CRL and OCSP requests are powered through CloudFlare's global network and <a href="http://unmitigatedrisk.com/?p=147">response times are under 100ms</a>. We are also planning on rolling out OCSP stapling, which allows the query for whether a certificate is invalid to be sent from the server without making an additional request to the CA's infrastructure.</p><p>CloudFlare runs all its own infrastructure, which allowed us to spec the hardware for maximum SSL performance. We worked with Intel to integrate a custom tuned version of OpenSSL which takes advantage of special instruction sets on our servers' CPUs to make encryption and decryption as fast as possible. In our tests, it is about 30% faster and uses fewer CPU resources. This allows us to choose stronger cyphers that maximize performance without suffering a performance penalty.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/CWlaNy0UKN5jhdaxwOj7a/3e520924d55f99ca8f89fc01996644f6/speedy-gonzales.jpeg.scaled500.jpg" />
            
            </figure>
    <div>
      <h3>Expanding SSL Adoption</h3>
      <a href="#expanding-ssl-adoption">
        
      </a>
    </div>
    <p>Equally important, we've worked to make SSL as easy as possible, regardless of the capabilities of your own infrastructure. SSL is included automatically for every <a href="http://www.cloudflare.com/plans">paid CloudFlare plan</a> and is provisioned automatically with a single click. We allow customers to choose Full SSL, which ensures end-to-end encryption, or Flexible SSL, which encrypts the connection from the browser to CloudFlare's network, the riskiest part of the transaction, but doesn't require you to run SSL on your origin server. This allows you to <a href="/ssl-on-tumblr-wordpress-blogger-appengine-pos">add SSL to services like Google AppEngine and Tumblr</a>, which don't allow SSL support themselves or only include it as an expensive add on.</p><p>While CloudFlare's Pro accounts include SSL certificates issued by our own systems, with the launch of our <a href="http://www.cloudflare.com/plans">Business and Enterprise tiers</a>, customers can now upload their own certificates to use on our network. This allows support of extended validation (EV) certificates on our optimized infrastructure.</p><p>As new performance technologies like SPDY require SSL support, and as new threats continue to emerge online, ensuring SSL runs as fast and secure as possible becomes increasingly important. CloudFlare will continue to work to make SSL performance faster in order to fulfill our mission of building a web that is both safer <i>and</i> faster.</p> ]]></content:encoded>
            <category><![CDATA[OCSP]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[SSL]]></category>
            <category><![CDATA[TLS]]></category>
            <category><![CDATA[Speed]]></category>
            <category><![CDATA[spdy]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">2bJs2dMtixCi7wEflqRkzM</guid>
            <dc:creator>Matthew Prince</dc:creator>
        </item>
        <item>
            <title><![CDATA[Why mobile performance is difficult]]></title>
            <link>https://blog.cloudflare.com/why-mobile-performance-is-difficult/</link>
            <pubDate>Thu, 28 Jun 2012 06:48:00 GMT</pubDate>
            <description><![CDATA[ Mobile web browsing is very different, at the network level, to browsing on a desktop machine connected to the Internet. Yet both use the very same protocols, and although TCP was designed to perform well on the fixed-line Internet, it doesn't perform as well on mobile networks.  ]]></description>
            <content:encoded><![CDATA[ <p>Mobile web browsing is very different, at the network level, to browsing on a desktop machine connected to the Internet. Yet both use the very same protocols, and although TCP was designed to perform well on the fixed-line Internet, it doesn't perform as well on mobile networks. This post looks at why and how CloudFlare is helping.</p><p>We start with a simple ping. Here's a ping from my laptop machine (which is connected via 802.11g WiFi to a 20Mbps broadband connection) to a machine at Google. Looks like I'm getting a roundtrip time of about 20ms.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4SPeLtpDF4TnhjvUGYVQjI/7d91273e0b26466302edeeba9a2a155e/Screen_Shot_2012-06-27_at_4.22.50_PM.png.scaled500.png" />
            
            </figure><p>Here's the same ping done from my iPhone on the same WiFi network at the same location in the house. The ping time has gone up to about 60ms. So, in this instance, the round trip time had tripled just from going from laptop to phone.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3JLqXO7BfXiHbgvw3UugBE/066ea75ff0c3e6097c7c64fe8283136a/IMG_3783.PNG.scaled500.png" />
            
            </figure><p>But to see the real cost of mobile it's necessary to switch off WiFi and onto 3G. Here's the ping time on 3G to the same machine. Here's it's both much higher (we're now into 1/10 to 1/5 of a second territory) but it's also variable:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6ndn2280K7W1PByFoFpGLW/92fa0ee7f48ee38ea3e26d87bb99928a/IMG_3777.PNG.scaled500.png" />
            
            </figure><p>And then I get up and move to the front of the house and try again. The ping time has changed completely (the number of bars didn't) and I'm seeing between 0.5s and 1s of round trip time. That will have a serious effect on web browsing.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7Gi1744fWZEvvbYSMDifD0/8d44a485457558e4678b85750459e8f4/IMG_3778.PNG.scaled500.png" />
            
            </figure><p>And for a final test I return to my original location and grip the iPhone firmly in my hand. The number of bars falls away and the round trip time becomes infinite! Pings simply aren't working any more.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/dzdtT2vNyMnykyPsFSqM5/aabcce5584a061aecc511d0830c85d22/IMG_3781.PNG.scaled500.png" />
            
            </figure><p>What this illustrates is something that any smartphone user knows instinctively: network performance on phone is very variable and susceptible to location and environment. TCP would actually work just fine on a phone except for one small detail: phones don't stay in one location. Because they move around (while using the Internet) the parameters of the network (such as the latency) between the phone and the web server are changing and TCP wasn't designed to detect the sort of change that's happening.</p><p>In past posts I've looked at the effect of <a href="/the-bandwidth-of-a-boeing-747-and-its-impact">high latency on web browsing</a> and <a href="/the-bandwidth-of-a-boeing-747-and-its-impact">TCP's connection and slow start cost</a>. One of the fundamental parts of the TCP specification covers congestion avoidance: the <a href="http://en.wikipedia.org/wiki/Transmission_Control_Protocol#Congestion_control">detection and avoidance of congestion</a> on the Internet. At the start of a connection TCP's slow start prevents it from blasting out packets until it's detected the maximum possible speed it can transmit at, and during a connection TCP actively watches for signs of congestion. The smooth running of the Internet as a whole relies on protocols like TCP being able to detect congestion and slow down. If not there'd likely be a <a href="http://en.wikipedia.org/wiki/Congestive_collapse#Congestive_collapse">congestion collapse</a>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5VrcDARG9qzMgNjzXE0bsS/b37ca6778d6044db491d102e60667c4a/7454479488_9cf64433d6.jpeg.scaled500.jpg" />
            
            </figure><p>Image credit: <a href="http://www.parliamentlive.tv/Main/Player.aspx?meetingId=10948&amp;wfs=true">joiseyshowaa</a></p><p>TCP spots congestion by watching for lost packets. On the wired Internet lost packets are a sign of congestion: they're a sign that a buffer in a router or server somewhere along the route packets are taking is full and is simply dropping packets. When lost packets are detected by TCP it slows down.</p><p>That all falls apart on mobile networks because packets get lost for other reasons: you move around your house while surfing a web page, or you're on the train, or you just block the signal some other way. When that happens it's not congestion, but TCP thinks it is, and reacts by slowing down the connection.</p><p>It seems like it might be a simple matter to change the congestion avoidance algorithm in TCP to take into account the challenges of mobile networks, but it's actually an area of <a href="http://en.wikipedia.org/wiki/TCP_congestion_avoidance_algorithm">active research</a> with many different possible replacements for the existing basic algorithm. It's hard because trying to balance maximizing throughput, preventing congestion on the Internet, dealing with actual congestion, and spotting phony congestion is complex.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2Pbjdr8LCoKszcWmPWU6uF/4da4d491fb6c86da01303f01390fa0c1/6031969871_19086b6f70.jpeg.scaled500.jpg" />
            
            </figure><p>Image credit: <a href="http://www.flickr.com/photos/mikecogh/">mikecogh</a></p><p>And if that weren't enough mobile networks also introduce another tricky problem: packet reordering. Although TCP is designed to cope with reordering of packets (because they might have followed different routes between source and destination) large reordering can occur in mobile networks when a mobile phone is handed off from one tower to the next.</p><p>For example, a stream of packets being transmitted by a moving mobile user (perhaps sending a large email) might be split with some going down one route through one tower and the rest through a different tower and by a different route.</p><p>This causes problems for some of the newer congestion avoidance algorithms (such as <a href="http://en.wikipedia.org/wiki/TCP_congestion_avoidance_algorithm#TCP_New_Reno">TCP New Reno</a>) and can cause additional slow downs.</p><p>CloudFlare helps solve these problems for our customers in two ways. Firstly, we customize the parameters inside the TCP stacks in our web servers to tune for the best possible performance and secondly we actively monitor and classify the connections from people surfing our customers' sites.</p><p>By classifying connections we are able to dynamically determine the best way to behave on a connection. We know whether this is likely to be a high-latency mobile phone browsing session, or a high-bandwidth broadband connection in someone's home or office. Doing that allows us to give the best performance to end users, and ensure that customers' web sites are snappy wherever and however they are accessed.</p><p>And we continually look at ways of improving network performance for our customers by tuning TCP, monitoring performance, opening new data centers and introducing features like <a href="/combining-javascript-css-a-better-way">Rocket Loader</a>, <a href="/introducing-mirage-intelligent-image-loading">Mirage</a>, <a href="/introducing-polish-automatic-image-optimizati">Polish,</a> <a href="/what-makes-spdy-speedy">SPDY</a>, and <a href="https://www.cloudflare.com/railgun">Railgun</a>.</p> ]]></content:encoded>
            <category><![CDATA[Mobile]]></category>
            <category><![CDATA[TCP]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Mirage]]></category>
            <category><![CDATA[Cloudflare Polish]]></category>
            <category><![CDATA[spdy]]></category>
            <category><![CDATA[Rocket Loader]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">1MVrMDyoyJFXjugBzfD5Zg</guid>
            <dc:creator>John Graham-Cumming</dc:creator>
        </item>
        <item>
            <title><![CDATA[What makes SPDY speedy?]]></title>
            <link>https://blog.cloudflare.com/what-makes-spdy-speedy/</link>
            <pubDate>Mon, 25 Jun 2012 07:14:00 GMT</pubDate>
            <description><![CDATA[ Google has proposed a new protocol for downloading web pages called SPDY and CloudFlare will shortly be making it available in beta form. SPDY is designed to make web browsing faster without replacing HTTP.  ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Image credit: <a href="http://www.flickr.com/photos/loco_2/">Loco_2</a></p><p>Google has proposed a new protocol for downloading web pages called <a href="http://en.wikipedia.org/wiki/SPDY">SPDY</a> and CloudFlare will shortly be <a href="/introducing-spdy">making it available</a> in beta form. SPDY is designed to make web browsing faster without replacing HTTP. This blog post explains how it works and why it helps.</p><p>Current web browsing makes use of the HTTP protocol running over TCP.The TCP protocol underlies many other uses of the Internet (such assending and receiving email) because it provides reliable delivery ofdata. HTTP is independent of TCP and provides a mechanism for a webbrowser to ask for pages, graphics and other files needed to display aweb page.</p><p>SPDY sits between HTTP and TCP to speed up the HTTP protocol by changing how it interacts with TCP. First, let's look at getting a web page with HTTP over TCP without SPDY and then see how that changes with SPDY.</p><p>A typical web browsing session goes something like this: you type cloudflare.com into your browser and it sends an HTTP request over TCP to the cloudflare.com server asking for the the HTML of the page. The page is delivered and the browser sets about parsing the page to determine what else it needs to download (e.g. the style sheets and images that make up the page).</p><p>Here's a screen shot from Firebug running in Mozilla Firefox. You can see the page being downloaded at the top and then the parts of the page (such as JavaScript, CSS and images) being downloaded in parallel.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3WKgWL3qsCGc6T29MgKGSd/47c9376c711daaf84ea6045c5beb82c6/Screen_Shot_2012-06-22_at_2.40.16_PM.png.scaled500.png" />
            
            </figure><p>But what's not clear from that view is how Firefox is actually connecting to the web server and retrieving the parts of the page. For that it's necessary to dig a little deeper. Using a combination of Wireshark and a custom program written in Processing here's a view of the TCP connections and downloading of each part of the CloudFlare home page.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6zsz5tmMmvRwJwaE34NiMD/32f41fd5989580f1f13a4ecc2bc19b20/Screen_Shot_2012-06-22_at_7.06.42_PM.png.scaled500.png" />
            
            </figure><p>The scale at the top shows elapsed time in seconds. Down the left hand side is the identifier of each TCP connection; each row in the diagram is a single TCP connection. On the right hand side is a number indicating how many separate parts of the page (images, CSS, JavaScript) were downloaded by the connection on that row.</p><p>The colors just indicate different parts of the page being downloaded. The size of the bars equates to the total time to get that part of the page.</p><p>The first connection begins by downloading the HTML of the page and then straight after that Firefox reuses the connection and opens another 6 connections to retrieve parts of the page. By opening multiple connections Firefox gets to download in parallel, by reusing a connection Firefox saves time starting a connection.</p><p>After the first set of connections there are another set used to download parts of the page. Some of these connections are reused multiple times.</p><p>It's likely pretty obvious why Firefox uses multiple simultaneous connections (because downloading can happen in parallel), but its reuse of connections is a little less obvious. Connections are reused because of two costs: connection set up time and TCP slow start.</p><p>First, it takes time to set up a TCP connection. The browser connects to the server and goes through a handshake to establish the connection. In the example above each connection was taking roughly 50ms to establish. If you did that for all 36 items being downloaded it would add up to 1.8s (longer than the entire download took). So, clearly reusing a connection helps.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7rBjghMPBKWgJNWbmHVmgA/31cedf696a58af582cb85f324b3f52b9/145450640_c337f29735.jpeg.scaled500.jpg" />
            
            </figure><p>Image credit: <a href="http://www.flickr.com/photos/dad_and_clint/">Charles &amp; Clint</a></p><p>But TCP slow start also matters. In a previous post I looked at the effect of <a href="/the-bandwidth-of-a-boeing-747-and-its-impact">bandwidth and latency</a> on downloading. What that post didn't mention is that the theoretical download speed is only reached after a period of slowness at the beginning of a TCP connection.</p><p>To avoid causing congestion on the Internet, every TCP connection starts slowly and works up to the maximum speed available. This is called <a href="http://en.wikipedia.org/wiki/Slow-start">TCP Slow Start</a>. So, each time a new TCP connection is established there's a double penalty: connection set up time and slow start. TCP slow start is also problematic on high latency links because detecting the maximum speed available on the connection requires back-and-forth packet exchanges.</p><p>Thus, to make efficient use of TCP the ideal browser would open a small number of connections and reuse them. That way the connection cost would be low, TCP slow start would be minimized and download speed would be maximized.</p><p>So, why did Firefox open 20 separate connections and only reuse them for a small number of requests each? Take a look at the line corresponding to connection 47108 in the diagram. Notice how a small download (in blue) had to wait behind a large download (in red).</p><p>Since the web browser can't predict how large or small the response to each request will be it is not able to order requests for efficient delivery. So, there's a balancing act to find the right number of connections to minimize page load time as bandwidth, latency, connection time and slow start have to be taken into account.</p><p>Using a small number of connections would result in blocking (a long slow download of say a large image could block a small quicker download because there's no 'overtaking' in HTTP); a large number of connections would avoid blocking and pay the price of connection set up and slow start.</p><p>Also, opening a large number of connections would place a load on the web server as each connection takes up resources on the server itself.</p><p>These problems come about in part because HTTP is synchronous: a request is made for part of a page and the connection it was made on needs to wait for the response. A better protocol would allow multiple requests to be sent and the responses returned in the order they are available. Line 47108 would look very different in that case: all three requests could be sent and the small one would be returned first even though it was the second request.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/26aO6DJTa36Zz5111yPWr5/c9fa243e1478ad7e8d79255d355e8577/4367848988_4e60dbe99a.jpeg.scaled500.jpg" />
            
            </figure><p>Image credit: <a href="http://www.flickr.com/photos/ben_salter/">Capt' Gorgeous</a></p><p>SPDY fixes all these problems in one go.</p><p>SPDY allows a single connection to be used for multiple requests. The requests can be sent in any order and responses come back in the order that they are available. Since a single connection is used the connection set up cost and slow start are minimized. Since requests can be answered in any order there's no blocking.</p><p>Of course, SPDY also does other things (such as compression of previously uncompressed parts of HTTP), but its core benefit is that it decouples HTTP from TCP and in doing so allows asynchronous, overlapping HTTP requests on a single connection. All without changing HTTP at all.</p><p>And shortly CloudFlare will be rolling out SPDY to our customers. Information about the beta is <a href="/introducing-spdy">here</a>.</p> ]]></content:encoded>
            <category><![CDATA[spdy]]></category>
            <category><![CDATA[Google]]></category>
            <category><![CDATA[TCP]]></category>
            <guid isPermaLink="false">7qtRAjs4NJLElsg200aaY2</guid>
            <dc:creator>John Graham-Cumming</dc:creator>
        </item>
        <item>
            <title><![CDATA[Introducing SPDY]]></title>
            <link>https://blog.cloudflare.com/introducing-spdy/</link>
            <pubDate>Fri, 15 Jun 2012 09:43:00 GMT</pubDate>
            <description><![CDATA[ In 2009, Google began work on a new network protocol to make web pages faster. Dubbed SPDY (pronounced "speedy"), the protocol is designed to solve many of the bottlenecks that slow HTTP down. Beginning today, we're rolling out a beta of SPDY to CloudFlare customers.  ]]></description>
            <content:encoded><![CDATA[ <p><i>We want to acknowledge and thank the amazing team of engineers at NGINX. They have been working on a SPDY implementation for quite some time and their work made it possible for us to roll out SPDY across our network. CloudFlare's core is built on top of the NGINX platform and we recommend it highly for anyone looking for a fast, secure, scalable web server. You can read more about their SPDY extension on their </i><a href="http://mailman.nginx.org/pipermail/nginx/2012-June/034233.html"><i>mailing list</i></a><i>.</i></p><hr /><p>In 2009, Google began work on a new network protocol to make web pages faster. Dubbed SPDY (pronounced "speedy"), the protocol is designed to solve many of the bottlenecks that slow HTTP down. Beginning today, we're rolling out a beta of SPDY to CloudFlare customers. Read this post and then, if you're interested in participating in the beta, <a href="https://www.cloudflare.com/spdy">complete the beta application form</a>.</p>
    <div>
      <h3>How SPDY Makes Things Speedy</h3>
      <a href="#how-spdy-makes-things-speedy">
        
      </a>
    </div>
    <p>Standard HTTP needs to make a new TCP request for all the objects on the page, Because there is significant overhead for each new TCP connection, all these connections slow down performance significantly. SPDY's biggest win comes from what is known as connection multiplexing. This means that mutiple objects from a particular site are requested and retrieved from a single request. Less connection overhead means faster page loads.</p><p>HTTP also requests objects in a particular order and one slow resource can block the loading of other resources. SPDY allows the browser to query for multiple objects in one request and for the objects to be sent down the wire as they are ready and out of order. Again, this can increase performance by not holding up the delivery of objects that are available quickly because some take longer to request.</p><p>SPDY includes some other performance wins as well. It allows HTTP headers to be compressed, which isn't possible with standard HTTP connections. The compression algorithm uses a HTTP-aware dictionary, which means common strings that appear in headers don't need to be sent across the network. Every byte you don't need to send not only reduces bandwidth use but, more importantly, increases web performance.</p>
    <div>
      <h3>SPDY Caveats</h3>
      <a href="#spdy-caveats">
        
      </a>
    </div>
    <p>While there is a lot of excitement around SPDY, there are some caveats. The first is that only certain browsers support the protocol. Google's Chrome and the latest release of Firefox (version 11+) contain SPDY support. While the Internet Engineering Task Force (IETF) is considering SPDY as an official Internet protocol, it has not yet been adopted so it's not clear whether there will be additional support from browsers such as Microsoft's Internet Explorer and Apple's Safari.</p><p>SPDY is built on top of TLS, which means it requires a site to have a valid <a href="https://www.cloudflare.com/application-services/products/ssl/">SSL certificate</a> in order to work. This, unfortunately, limits SPDY only to CloudFlare's paid customers who have enabled Flexible or Full SSL support. Microsoft is working on revised IETF proposal that is SPDY-like, but removes the requirement for SSL/TLS. If the TLS requirement is removed in the future, we'll make SPDY (or whatever it comes to be called) available more broadly.</p><p>Very few sites currently support SPDY (Google's sites and Twitter being the most notable to support the protocol). As a result, there haven't been a significant number of real world case studies. A recent article by an Akamai researcher pointed out that for much of the web <a href="http://www.guypo.com/technical/not-as-spdy-as-you-thought/">SPDY's performance wins will be limited</a>. We've confirmed similar findings in our tests. The primary reason for this caveat is that most sites are a collection of objects from multiple sources. Since SPDY's multiplexing only works on a per-domain basis, if a site has objects pulled from multiple sources then even if all those sources support SPDY connections still won't be able to be multiplexed between them.</p><p>Finally, SPDY is complicated to setup for a lot of sites. Support on most web servers is nascent and unproven. Because of this, sites have been hesitant to setup SPDY support themselves.</p>
    <div>
      <h3>How CloudFlare Makes SPDY Even Speedier</h3>
      <a href="#how-cloudflare-makes-spdy-even-speedier">
        
      </a>
    </div>
    <p>The good news is CloudFlare is making SPDY extremely easy and features like Rocket Loader remove some of the biggest SPDY caveats, making the protocol even speedier. For SPDY support, CloudFlare acts as a gateway. Similar to how CloudFlare's Automatic IPv6 Gateway works, an origin server doesn't need to support SPDY. Instead, visitors with browsers that support SPDY connect to CloudFlare over the protocol. We handle the multiplexing and begin sending down objects we already have in our cache. The request to the origin server for non-cached objects is sent over standard HTTP/S. As a result, CloudFlare customers can implement SPDY support with a single click.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2IlJHp4Rg949qPVHmFIS7Y/e87bd484784cec7e7f18a70e02b673ab/rocket_loader_diagram.png.scaled500.png" />
            
            </figure><p>CloudFlare's Rocket Loader also helps with <a href="/how-cloudflare-rocket-loader-redefines-the-modern-cdn/">some of the multiplexing limitations</a>. Rocket Loader was built to provide multiplex-like support over a standard HTTP connection. By gathering all scripts, regardless of where they're hosted, into a single HTTP request, Rocket Loader limits the number of HTTP connections that are needed. This also means that even third party scripts that appear on your page are requested under your site's domain. As a result, if you enable SPDY and Rocket Loader together then you will be able to get the benefits of multiplexing even for many of the object that make up your site even if they are hosted outside of your domain.</p>
    <div>
      <h3>Beta Rollout</h3>
      <a href="#beta-rollout">
        
      </a>
    </div>
    <p>CloudFlare is rolling out the SPDY beta to select customers over the coming weeks. To be eligible for the beta, you need to have SSL enabled which requires one of CloudFlare's <a href="http://cloudflare.com/plans">paid plans</a>. As mentioned above, this is a limitation of the protocol and if that limitation is removed in the future then we'll plan on rolling out SPDY support more broadly. If you're interested in trying it, <a href="https://www.cloudflare.com/spdy">complete the beta application form</a> and we'll send you an invitation as space is available.</p><p>At CloudFlare, we're committed to making the web speedier in every way we can. We're excited to offer the first easy way for websites that want to support SPDY to be able to do so easily and in a way that will get the most out of the protocol.</p> ]]></content:encoded>
            <category><![CDATA[TLS]]></category>
            <category><![CDATA[Rocket Loader]]></category>
            <category><![CDATA[spdy]]></category>
            <category><![CDATA[HTTPS]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">31V0OVzMkKUgaUpMxkdPQZ</guid>
            <dc:creator>Matthew Prince</dc:creator>
        </item>
        <item>
            <title><![CDATA[How CloudFlare Rocket Loader Redefines the Modern CDN]]></title>
            <link>https://blog.cloudflare.com/how-cloudflare-rocket-loader-redefines-the-modern-cdn/</link>
            <pubDate>Thu, 09 Jun 2011 22:59:00 GMT</pubDate>
            <description><![CDATA[ At CloudFlare, we built our own CDN from the ground up. We used the latest technologies like solid state drives and Anycast routing and geo load balancing to make it as fast and efficient as possible. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>At CloudFlare, we built our own CDN from the ground up. We used the latest technologies like solid state drives for screaming I/O and Anycast routing and geo load balancing to make it as fast and efficient as possible. But we didn't want our efforts to make the web faster to stop with the traditional CDN. There were two core problems we wanted to address. The first was that a website can no longer be thought of as served from a single web server in a single location. Websites are collections of multiple apps, widgets, and tags that include everything from the ad network code inserted on a page to include advertising to the Facebook Like button.</p><p>Anyone surfing the web has noticed the alert in the lower-left of your browser that says: "Waiting for _________ to load." In the past, if any one of these third party apps was slow to load, no matter what you did to improve your own site's performance, they could drag you down. While this lag is annoying on desktops, it's nearly impossible on a mobile device. Think of it this way: each one of those connections to another third party service is another opportunity for your mobile phone provider to screw up.</p><p>The second problem was that any script on a web page could potentially block it from rendering. The way browsers work, whenever a piece of script is encountered by default the browser needs to stop and wait for it to render before it can finish drawing the page. Again, we've all seen this: a site that the top part of the page loads, then it hangs while it waits for an ad, then the rest of the page fills in.</p><p>Compare that with how some of the Internet Giant's sites load. Facebook, for example, renders the page extremely quickly with the initial content you can see, then fires the scripts necessary to load in ads and make the pages interactive. The experience is not just a site that loads faster, but one that feels much snappier. And, again, with their more limited memory and CPU, the lag created by processing scripts is only amplified on mobile devices.</p><p>At CloudFlare, our team has spent the last year figuring out how we could leverage our technology to <a href="https://www.cloudflare.com/learning/cdn/common-cdn-issues/">address both these issues</a>. The first step in this is what we call Rocket Loader™. Rocket Loader does a bunch of things:</p><ol><li><p>It ensures that all the scripts on your page will not block the content of your page from loading;</p></li><li><p>Loads all the scripts on your page, including third party scripts, asynchronously;</p></li><li><p>Bundles all the script requests into a single request over which multiple responses can be streamed;</p></li><li><p>Uses LocalStorage on most browsers and nearly all smart phones to more intelligently store scripts so they aren't refetched unless necessary.</p></li></ol><p>At a high level, here's a diagram that outlines a way to think about it.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/CX9nZWG8T9M0yRyZdPfks/ef7f68eee37eab16f52452e2baf816e7/rocket_loader_diagram.png.scaled500.png" />
            
            </figure><p>CloudFlare adds two layers of cache for third party scripts that don't change often. First, we can store the scripts on our global CDN, so they are close to all your visitors and get the benefits of our extensive network (and an already-open HTTP connection). Second, on most modern browsers and smartphones, we use the browser's LocalStorage cache to intelligently store the resources that the site needs in order to avoid round trips to the server. Here's the Firebug waterfall chart of two pages loading before/after Rocket Loader is applied:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7J3XtLTx00KNP6Tz4M1m5r/51a9d0a3142b18d7f3665ec4073ef034/before_after_HAR.png.scaled500.png" />
            
            </figure><p>Google has done great work in this space, creating a protocol called <a href="http://en.wikipedia.org/wiki/SPDY">SPDY</a>. It is great, does many of the same performance optimizations and some others as well, but unfortunately only works with the Chrome browser. Rocket Loader will bring many of the same performance benefits promised by SPDY, but works on most browsers and all smart phones, whether your visitors are surfing your site from an iPhone, Android, or Windows device.</p><p>What's also really cool about this is, unlike some other companies that have done limited work in the space, CloudFlare doesn't need to cache your content in order to make these improvements. We modify the HTML on-the fly as it passes through our network, without slowing down page delivery. This means that CloudFlare can improve the performance of even highly dynamic websites without forcing you to flush your cache every time there's an update to your pages.</p><p>Want to see it in action? Check out the performance of the Financial Times site loaded side-by-side in a Firefox browser.</p><p>Despite the fact that FT is using one of the top-tier CDNs, Rocket Loader is able to double the site's performance. We don't mean to pick on the Financial Times: I personally love their content. While the improvement here is dramatic, we saw similar benefits across most major media sites despite heavy CDN usage.</p><p>People ask us all the time if CloudFlare is a CDN, and the answer at some level is yes. We run a globally distributed, load-balanced network that caches static content closer to the visitor. But, really, we've built something that's much more. We've taken the lessons learned from the last 15 years of CDNs, improved on those, and then applied many new technologies that take web performance to an entirely new level. You can <a href="http://cdata.github.com/presentations/what-else-is-cloudflare/">learn more from a presentation</a> Chris and Jason from our engineering team recently gave on the technology behind Rocket Loader.</p><p>Rocket Loader doesn't cost us anything more to deploy, and we believe everyone should have access to a fast site, so we include it in all of our plans: even the free one. Give it a try with one click from your CloudFlare settings page. If you find any pages with bugs, let us know through our <a href="https://www.cloudflare.com/wco-bug-report.html">special bug reporting page for the feature</a>. This is a radical new approach to web performance, and we're pushing updates daily to make it better and better.</p> ]]></content:encoded>
            <category><![CDATA[Cache]]></category>
            <category><![CDATA[Rocket Loader]]></category>
            <category><![CDATA[spdy]]></category>
            <guid isPermaLink="false">10oUw70bxV27RyVMSfoJBD</guid>
            <dc:creator>Matthew Prince</dc:creator>
        </item>
    </channel>
</rss>