
<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>Mon, 13 Apr 2026 18:13:35 GMT</lastBuildDate>
        <item>
            <title><![CDATA[Tools for debugging, testing and using HTTP/2]]></title>
            <link>https://blog.cloudflare.com/tools-for-debugging-testing-and-using-http-2/</link>
            <pubDate>Fri, 04 Dec 2015 12:56:36 GMT</pubDate>
            <description><![CDATA[ With CloudFlare's release of HTTP/2 for all our customers the web suddenly has a lot of HTTP/2 connections. To get the most out of HTTP/2 you'll want to be using an up to date web browser (all the major browsers support HTTP/2). ]]></description>
            <content:encoded><![CDATA[ <p>With CloudFlare's release of HTTP/2 for all our customers the web suddenly has a lot of HTTP/2 connections. To get the most out of HTTP/2 you'll want to be using an up to date web browser (all the major browsers support HTTP/2).</p><p>But there are some non-browser tools that come in handy when working with HTTP/2. This blog post starts with a useful browser add-on, and then delves into command-line tools, load testing, conformance verification, development libraries and packet decoding for HTTP/2.</p><p>If you know of something that I've missed please write a comment.</p>
    <div>
      <h3>Browser Indicators</h3>
      <a href="#browser-indicators">
        
      </a>
    </div>
    <p>For Google Chrome there's a handy <a href="https://chrome.google.com/webstore/detail/http2-and-spdy-indicator/mpbpobfflnpcgagjijhmgnchggcjblin?hl=en">HTTP/2 and SPDY Indicator</a> extension that adds a colored lightning bolt to the browser bar showing the protocol being used when a web page is viewed.</p><p>The blue lightning bolt shown here indicates that the CloudFlare home page was served using HTTP/2:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5oLd6mBoInw37IHY1A2EuQ/82331d2180273d64fa55a756b757c0f8/Screen-Shot-2015-12-03-at-12-08-25.png" />
            
            </figure><p>A green lightning bolt indicates the site was served using SPDY and gives the SPDY version number. In this case SPDY/3.1:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5mis7IT15cGk32zcQAl73M/9747e4c2afc6d1a891e9b75ee6249895/Screen-Shot-2015-12-03-at-12-15-10.png" />
            
            </figure><p>A grey lightning bolt indicates that neither HTTP/2 no SPDY were used. Here the web page was served using HTTP/1.1.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/30VuLV8Q9qqPC2hpvtkU3l/3440efe822df32649b80a2547de2252c/Screen-Shot-2015-12-03-at-12-10-18.png" />
            
            </figure><p>There's a similar extension for <a href="https://addons.mozilla.org/en-GB/firefox/addon/spdy-indicator/">Firefox</a>.</p>
    <div>
      <h4>Online testing</h4>
      <a href="#online-testing">
        
      </a>
    </div>
    <p>There's also a handy <a href="https://tools.keycdn.com/http2-test">online tool</a> to check any individual web site.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/DwWwyYZflqaees6W4aJaw/fea382962f1dbb50827f29b480cb72a8/Screen-Shot-2015-12-03-at-12-22-11.png" />
            
            </figure>
    <div>
      <h4>Claire</h4>
      <a href="#claire">
        
      </a>
    </div>
    <p>CloudFlare also has a Google Chrome extension called <a href="https://chrome.google.com/webstore/detail/claire/fgbpcgddpmjmamlibbaobboigaijnmkl">Claire</a> that gives information about how a web page was loaded. For example here's the information that Claire shows for a site using CloudFlare that uses <a href="https://www.cloudflare.com/ipv6">IPv6</a>, <a href="https://www.cloudflare.com/railgun">Railgun</a>, and HTTP/2.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5xZKZgNYat4xEKVCyzYhn4/c4db4e2c32cccd4e78b8361fddb4ebcf/Screen-Shot-2015-12-03-at-17-12-50.png" />
            
            </figure>
    <div>
      <h3>Command-line Tools</h3>
      <a href="#command-line-tools">
        
      </a>
    </div>
    <p>There's a handy command-line tool called <a href="https://github.com/stefanjudis/is-http2-cli">is-http</a> which is installed using npm as follows:</p>
            <pre><code>npm install -g is-http2-cli</code></pre>
            <p>Once installed you can check the HTTP/2 status of a web on the command-line:</p>
            <pre><code>$ is-http2 www.cloudflare.com
✓ HTTP/2 supported by www.cloudflare.com
Supported protocols: h2 spdy/3.1 http/1.1

$ is-http2 www.amazon.com
× HTTP/2 not supported by www.amazon.com
Supported protocols: http/1.1</code></pre>
            <p>The <code>is-http</code> tool is also useful because it gives you a list of the protocols advertised by the server. As you can see <a href="http://www.cloudflare.com">www.cloudflare.com</a> supports HTTP/2, HTTP/1.1 and SPDY/3.1.</p>
    <div>
      <h4>curl</h4>
      <a href="#curl">
        
      </a>
    </div>
    <p>In version 7.43.0 the venerable <code>curl</code> tool got HTTP/2 support when it's linked with the <a href="https://nghttp2.org/">nghttp</a> library. To build <code>curl</code> from sources you'll need OpenSSL, zlib, nghttp2 and libev. I used the following sequence of commands.</p>
            <pre><code>$ curl -LO http://dist.schmorp.de/libev/libev-4.20.tar.gz
$ tar zvxf libev-4.20.tar.gz
$ cd libev-4.20
$ ./configure
$ make
$ sudo make install

$ curl -LO https://www.openssl.org/source/openssl-1.0.2d.tar.gz
$ tar zxvf openssl-1.0.2d.tar.gz
$ cd openssl-1.0.2d
$ ./config shared zlib-dynamic
$ make &amp;&amp; make test
$ sudo make install

$ curl -LO http://zlib.net/zlib-1.2.8.tar.gz
$ tar zxvf zlib-1.2.8.tar.gz
$ cd zlib-1.2.8
$ ./configure
$ make &amp;&amp; make test
$ sudo make install

$ curl -LO https://github.com/tatsuhiro-t/nghttp2/releases/download/v1.5.0/nghttp2-1.5.0.tar.gz
$ tar zxvf nghttp2-1.5.0.tar.gz
$ cd nghttp2-1.5.0
$ OPENSSL_CFLAGS="-I/usr/local/ssl/include" OPENSSL_LIBS="-L/usr/local/ssl/lib -lssl -lcrypto -ldl" ./configure
$ make
$ sudo make install

$ curl -LO http://curl.haxx.se/download/curl-7.46.0.tar.gz
$ tar zxvf curl-7.46.0.tar.gz
$ cd curl-7.46.0
$ ./configure
$ make &amp;&amp; make test
$ sudo make install
$ sudo ldconfig</code></pre>
            <p>Once installed <code>curl</code> has a new <code>--http2</code> option that causes it to use HTTP/2 (if it can). The <code>-v</code> verbose option will show information about the use of HTTP/2:</p>
            <pre><code>$ curl -vso /dev/null --http2 https://www.cloudflare.com/
[...]
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* TCP_NODELAY set
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0xc3dba0)
[...]</code></pre>
            
    <div>
      <h4>nghttp2</h4>
      <a href="#nghttp2">
        
      </a>
    </div>
    <p>If you built <code>curl</code> using my instructions above you will have built and installed some tools that come with the <a href="https://nghttp2.org/">nghttp2</a> library. One of those is a command-line client called <code>nghttp</code>. It can be used like <code>curl</code> to download from the web using HTTP/2 but it also has a handy verbose option that shows that actual HTTP/2 frames sent and received.</p><p>By running it with <code>-nv</code> you get HTTP/2 and throw away the actual downloaded page. Here's its output when downloading <a href="http://www.cloudflare.com">www.cloudflare.com</a> using HTTP/2. On a terminal with color support it uses coloring to highlight different parts of the log.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5XhV2QcvnnoVSUERRpyGgP/d204e9ebeaff7da0cac4ead13aa053a5/Screen-Shot-2015-12-03-at-13-24-46.png" />
            
            </figure>
    <div>
      <h4>h2c</h4>
      <a href="#h2c">
        
      </a>
    </div>
    <p>Another curl-like command-line tool for HTTP/2 is <a href="https://github.com/fstab/h2c">h2c</a>. It also enables dumping of HTTP/2 frames and has a nice feature that it runs in the background and keeps connections to servers alive and has a useful 'wiretap' feature for intercepting an HTTP/2 for debugging.</p><p>If you have <a href="https://golang.org/dl/">Go 1.5.1</a> installed then you can download it as follows:</p>
            <pre><code>$ export GO15VENDOREXPERIMENT=1
$ go get github.com/fstab/h2c</code></pre>
            <p>You start <code>h2c</code> running by doing <code>h2c start &amp;</code> which sets it running in the background. You can then communicate with a web server like this:</p>
            <pre><code> $ h2c connect www.cloudflare.com
 $ h2c get /
 $ h2c disconnect</code></pre>
            <p>And it will perform the HTTP request. To see detailed output at the HTTP/2 you start h2c with the <code>--dump</code> parameter:</p>
            <pre><code> $ h2c start --dump</code></pre>
            <p>You will then get detailed output dumped by that process, in color, of the HTTP/2 frames being used.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5QvyA73OaYNPT3ZJSOHay/ca5212fabad813467a33235b4653affd/Screen-Shot-2015-12-03-at-13-11-19.png" />
            
            </figure><p>Details of the wiretap feature are in [this blog post](<a href="http://unrestful.io/2015/08/28/wiretap.html">http://unrestful.io/2015/08/28/wiretap.html</a>).</p>
    <div>
      <h4>openssl s_client</h4>
      <a href="#openssl-s_client">
        
      </a>
    </div>
    <p>If you just want to find out what protocols a web site supports OpenSSL's <code>s_client</code> can be used. If you specify an empty <code>-nextprotoneg</code> option OpenSSL sends an empty TLS option asking for negotiation of the next protocol and the server responds with a complete list of protocols it supports.</p>
            <pre><code>$ openssl s_client -connect www.cloudflare.com:443 -nextprotoneg ''
CONNECTED(00000003)
Protocols advertised by server: h2, spdy/3.1, http/1.1</code></pre>
            <p>There you can see that <a href="http://www.cloudflare.com">www.cloudflare.com</a> support HTTP/2 (the h2), SPDY/3.1 and HTTP/1.1.</p>
    <div>
      <h4>h2i</h4>
      <a href="#h2i">
        
      </a>
    </div>
    <p>If you want to do low level HTTP/2 debugging there's an interactive client call <a href="https://github.com/golang/net/tree/master/http2/h2i">h2i</a>. Once again it requires that you have Go installed. To get it, run</p>
            <pre><code>$ go get github.com/golang/net/http2/h2i</code></pre>
            <p>You can then use <code>h2i</code> to connect to a site that uses HTTP/2 and send it individual HTTP/2 frames. For example, here's the start of session connecting to <a href="http://www.cloudflare.com">www.cloudflare.com</a> and requesting the home page using the <code>headers</code> command which allows you to type in a standard HTTP/1.1 request.</p>
            <pre><code>$ h2i www.cloudflare.com
Connecting to www.cloudflare.com:443 ...
Connected to 198.41.214.163:443
Negotiated protocol "h2"
[FrameHeader SETTINGS len=18]
 [MAX_CONCURRENT_STREAMS = 128]
 [INITIAL_WINDOW_SIZE = 2147483647]
 [MAX_FRAME_SIZE = 16777215]
[FrameHeader WINDOW_UPDATE len=4]
  Window-Increment = 2147418112

h2i&gt; headers
 (as HTTP/1.1)&gt; GET / HTTP/1.1
 (as HTTP/1.1)&gt; Host: www.cloudflare.com
 (as HTTP/1.1)&gt;
  Opening Stream-ID 1:
  :authority = www.cloudflare.com
  :method = GET
  :path = /
  :scheme = https
 [FrameHeader HEADERS flags=END_HEADERS stream=1 len=819]
   :status = "200"
   server = "cloudflare-nginx"
   date = "Fri, 04 Dec 2015 10:36:15 GMT"
   content-type = "text/html"
   last-modified = "Thu, 03 Dec 2015 22:27:41 G MT" 
   strict-transport-security = "max-age=31536000"
   x-content-type-options = "nosniff"
   x-frame-options = "SAMEORIGIN"
   cf-cache-status = "HIT"
   expires = "Fri, 04 Dec 2015 14:36:15 GMT"
   cache-control = "public, max-age=14400"
 [FrameHeader DATA stream=1 len=7261]
   "&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n&lt;!</code></pre>
            
    <div>
      <h3>Load Testing</h3>
      <a href="#load-testing">
        
      </a>
    </div>
    <p>The <a href="https://nghttp2.org">nghttp2</a> library also includes a load testing tool called <a href="https://nghttp2.org/documentation/h2load.1.html">h2load</a> which can be used a little like <a href="https://httpd.apache.org/docs/2.2/programs/ab.html">ab</a>. There's a useful <a href="https://nghttp2.org/documentation/h2load-howto.html">HOWTO</a> on using the tool.</p><p>I ran it against the CloudFlare test server like this:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/hWDbuK231mcZwO1JOKtvo/b012e7a9e6863bd360992858f0e24b8d/Screen-Shot-2015-12-03-at-16-02-50.png" />
            
            </figure>
    <div>
      <h3>Conformance</h3>
      <a href="#conformance">
        
      </a>
    </div>
    <p>If you are testing an HTTP/2 implementation there's a useful tool called h2spec which runs through a conformance test against a real HTTP/2 server. To use it first install <a href="https://golang.org/dl/">Go 1.5.1</a> and then do</p>
            <pre><code>$ go get github.com/summerwind/h2spec/cmd/h2spec</code></pre>
            <p>I only recommend it for testing locally running HTTP/2 servers. If you built <code>nghttp2</code> above while building <code>curl</code> you will also have the <code>nghttpd</code> HTTP/2 server available. You can run <code>h2spec</code> against it like this:</p>
            <pre><code>$ nghttpd --no-tls -D -d /tmp 8888
$ h2spec -p 8888</code></pre>
            <p><code>h2spec</code> will run a battery of tests against the server and output conformance information with a reference to the relevant part of <a href="https://tools.ietf.org/html/rfc7540">RFC7540</a>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1fHO4ABgKvK4LFEnRKf3sT/5613c3aafbdefdeae8584f09d476b9ae/Screen-Shot-2015-12-03-at-14-49-07.png" />
            
            </figure><p>If you need to test a number of web sites to see which support HTTP/2 there's a tool called <a href="https://github.com/jgrahamc/h2scan">h2scan</a>. Feed it a list of web sites and it will check to see if they support HTTPS, SPDY/3.1 and HTTP/2.</p>
            <pre><code>$ cat examples
www.cloudflare.com
www.amazon.com
www.yahoo.com
$ h2scan --fields &lt; examples
name,resolves,port443Open,tlsWorks,httpsWorks,cloudflare,spdyAnnounced,http2Announced,spdyWorks,http2Works,npn
www.cloudflare.com,t,t,t,t,t,t,t,t,t,h2 spdy/3.1 http/1.1
www.amazon.com,t,t,t,t,f,f,f,-,-,http/1.1
www.yahoo.com,t,t,t,t,f,t,f,t,-,spdy/3.1 spdy/3 http/1.1 http/1.0</code></pre>
            
    <div>
      <h3>Useful Libraries</h3>
      <a href="#useful-libraries">
        
      </a>
    </div>
    <p>If you are working in C and need to add HTTP/2 support to a program there's the <a href="https://nghttp2.org/">nghttp2</a> library that is full implementation of HTTP/2 with a simple interface. Their <a href="https://nghttp2.org/documentation/tutorial-client.html#libevent-client-c">HTTP/2 client tutorial</a> explains how to use the library to add HTTP/2 client capabilities. nghttp2 can also be used for <a href="https://nghttp2.org/documentation/tutorial-server.html#libevent-server-c">servers</a>.</p><p>Go programmers will find full HTTP/2 support will arrive with Go 1.6. If you can't wait until then there's an extension package for HTTP/2 <a href="https://godoc.org/golang.org/x/net/http2">golang.org/x/net/http2</a> . Details <a href="https://http2.golang.org/">here</a>.</p><p>There's a pure Ruby implementation of HTTP/2 available from <a href="https://github.com/igrigorik/http-2">Ilya Grigorik</a>.</p><p>Haskell programmers can use the <a href="https://hackage.haskell.org/package/http2">http2</a> hackage.</p>
    <div>
      <h3>Packet Snooping</h3>
      <a href="#packet-snooping">
        
      </a>
    </div>
    <p>The popular Wireshark packet analyzer added decoding on HTTP/2 in version <a href="https://www.wireshark.org/docs/relnotes/wireshark-1.12.0.html#_new_protocol_support">1.12.0</a> and fully decodes HTTP/2 frames. Unfortunately most HTTP/2 is sent over TLS which means that, by default, Wireshark will not be able to decrypt the packets to be able to get to the HTTP/2 for decoding.</p><p>Fortunately, there is a workaround if you are using Google Chrome for testing. It is possible to get Chrome to save the symmetric cryptographic key used for TLS connections to a file and Wireshark is able to read that file to decode TLS connections.</p><p>This is done by setting the <code>SSLKEYLOGFILE</code> environment variable before running Chrome. I'm running on Mac OS X and use Google Chrome Canary for testing so I run:</p>
            <pre><code>% export SSLKEYLOGFILE=`pwd`/sslkey.log
% /Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary</code></pre>
            <p>Google Chrome will then write session keys to that file. In Wireshark I configure it to read the file by going to Preferences, expanding the Protocols list.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3VtO5XasCO2zeTqVfoTSPw/bc93d70e94487845510f5a8bbb4a0b06/Screen-Shot-2015-12-03-at-15-48-59.png" />
            
            </figure><p>Then I find SSL and set the Pre-Main-Secret log filename to point to the same file.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1MluGb7E88xSg352ummOYT/7bd9b00a4580287fe629502873e5c81e/Screen-Shot-2015-12-03-at-15-49-44.png" />
            
            </figure><p>Then Wireshark can decode the TLS connections made by that browser. Here's the beginning of a connection between Google Chrome Canary and the experimental server <a href="https://http2.cloudflare.com/">https://http2.cloudflare.com/</a>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3g7dIhFoqbTfoj24iX4Yu/535556886753cc531e686595f96004c4/Screen-Shot-2015-12-03-at-15-51-04.png" />
            
            </figure>
    <div>
      <h3>Chrome Developer View</h3>
      <a href="#chrome-developer-view">
        
      </a>
    </div>
    <p>Finally, if you are looking at the performance of your own web site it can be handy to understand which parts of the page were downloaded using HTTP/2 and which were not. You can do that pretty easily using the Developer view in Google Chrome. Here's a shot of the CloudFlare blog loaded in Chrome. There's an additional Protocol fields available on the pop-up menu.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3KIWDKeDrHOsJYLQxKDFcT/f28684e2e951ad03a2d3db3db5075ee6/Screen-Shot-2015-12-04-at-10-46-21.png" />
            
            </figure><p>Once added you can sort by protocol to see which parts were HTTP/2 (the h2) and which were other protocols.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4yftvuhcm97tnJvQJou28Z/53e7051e0112f8c01ac7edb1d6d0d96d/Screen-Shot-2015-12-04-at-10-46-29.png" />
            
            </figure>
    <div>
      <h3>Learning about HTTP/2</h3>
      <a href="#learning-about-http-2">
        
      </a>
    </div>
    <ol><li><p>Short <a href="https://www.cloudflare.com/http2/what-is-http2/">introduction to HTTP/2</a> from CloudFlare.</p></li><li><p><a href="http://daniel.haxx.se/http2/">http2 explained</a> from the creator of <code>curl</code>.</p></li><li><p>The <a href="http://http2.github.io/">home page</a> of the HTTP/2 working group with lots of information plus a list of useful <a href="https://github.com/http2/http2-spec/wiki/Tools">tools</a>.</p></li></ol> ]]></content:encoded>
            <category><![CDATA[HTTP2]]></category>
            <category><![CDATA[Google]]></category>
            <category><![CDATA[Claire]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Programming]]></category>
            <guid isPermaLink="false">4j93RdB2JSheBauKZqi3x2</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[How to Tell How Well Railgun Is Working for Your Site]]></title>
            <link>https://blog.cloudflare.com/how-to-tell-how-well-railgun-is-working-for-y/</link>
            <pubDate>Wed, 27 Feb 2013 23:07:00 GMT</pubDate>
            <description><![CDATA[ Yesterday, we announced that 30 of the world's largest hosting providers are now supporting CloudFlare's Railgun WAN optimization technology.  ]]></description>
            <content:encoded><![CDATA[ <p>Yesterday, we announced that 30 of the world's largest hosting providers are now supporting CloudFlare's Railgun WAN optimization technology. Railgun uses delta compression to only transmit the parts of a dynamic page that have changed from one request to another. The net effect is that, on average, we can achieve a 99.6% compression ratio. In other words, what uncompressed would have taken 200 packets with Railgun we can transmit in a single packet.</p><p>This blog post is about using headers we include in responses delivered from Railgun in order to see how it is working. We've been running Railgun on CloudFlare.com for the last few months so I'll use it as an example.</p>
    <div>
      <h3>Exposing the Headers</h3>
      <a href="#exposing-the-headers">
        
      </a>
    </div>
    <p>When a request is handled by Railgun, CloudFlare inserts a header with diagnostic information to track how the protocol is doing. If you want to see these headers, you'll need to use a browser that supports examining header information. Google's Chrome Browser or Apple's Safari Browser allow you to access Developer Tools (in Google, select the View &gt; Developer &gt; Developer Tools menu; in Safari, select the Develop &gt; Show Web Inspector menu). In Firefox, you can install <a href="http://getfirebug.com/">Firebug</a> to see response headers. Microsoft's Internet Explorer makes it a bit trickier to see the response headers, but you can use a tool like <a href="http://www.fiddler2.com/fiddler2/">Fiddler</a> in order to expose them.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3ECdNDw0dyUtAPF4eoiXBE/751dbcd8f8d18f84e2a399c58ac9b63e/claire_screenshot.png.scaled500.png" />
            
            </figure><p>At CloudFlare, we've also made a Chrome extension for our own debugging purposes that we call Claire. When installed, it adds a small "cloud" icon to the right corner of the URL bar. If you're visiting a site that uses CloudFlare, lights up orange. Small icons under the cloud indicate whether you're using SPDY, Railgun, or IPv6 for your connection. Clicking on the icon exposes more data including information about the Railgun connection.</p><p>While Claire makes seeing the Railgun information easy, I'm going to walk through the rest of this post assuming you don't have it installed. Instead, I'll use Chrome's Developer Tools for the examples.</p>
    <div>
      <h3>Story in the Headers</h3>
      <a href="#story-in-the-headers">
        
      </a>
    </div>
    <p>If you open the Developer Tools panel and click on the Network tab you'll see an interface like the one in the picture below:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4Z2Fn8wfypVSvHqpTeQaZL/26e22bad6ca35b55f8f636826acdc514/chrome_developer_tools_cloudflare.png.scaled500.png" />
            
            </figure><p>Clicking on the first item in the list, which represents the dynamic HTML content that makes up the page, and then clicking on the Headers tab will show you the headers your browser sent to CloudFlare's servers as well as, if you scroll down, the response headers that your browser received back. Below is a sample of the response headers when accessing <a href="http://www.cloudflare.com">www.cloudflare.com</a>:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/35LbDaVPf1JXOIaQDZs4r0/3a83a4b2094b652d77fbba9cc5ae1437/cloudflare_response_headers.png.scaled500.png" />
            
            </figure><p>There are two headers that CloudFlare is inserting in the response:</p>
            <pre><code>cf-railgun: e95b1c46e0 0.02 0.037872 0030 9878
cf-ray: 478149ad1570291</code></pre>
            <p>The second of these headers is what we call a RayID. This is a unique serial number attached to every request through the CloudFlare network, start to finish, which helps us diagnose if there's a problem at some step in our chain. If you ever have an error on your site when accessing CloudFlare, providing the RayID to our support team can help us track down the cause very quickly. The header I'm going to focus on for this post is the cf-railgun header, which I'll break down below.</p>
    <div>
      <h3>The CF-Railgun Header</h3>
      <a href="#the-cf-railgun-header">
        
      </a>
    </div>
    <p>The CF-Railgun header has up to five codes separated by a space. In order, these codes and their corresponding values from the example above are:</p><ul><li><p>Railgun Request ID: e95b1c46e0</p></li><li><p>Compression Ratio: 0.02</p></li><li><p>Origin Processing Time: 0.037872</p></li><li><p>Railgun Flags: 0030</p></li><li><p>Version Number: 9878</p></li></ul><p>Breaking these down, the Railgun Request ID corresponds to an internal process number that allows us to track what connection handled a request in order to diagnose potential problems. Generally, you shouldn't need this value unless you're reporting a problem with your Railgun installation.</p><p>The Compression Ratio is more interesting in gauging how Railgun is down. It represents the size of the response after Railgun's delta compression expressed as a percentage. In the example above, the HTML returned for <a href="http://www.cloudflare.com">www.cloudflare.com</a> is 0.02% of the size of the original that would be returned assuming no origin compression. Another way of thinking about this is the amount of data saved, which can be calculated by subtracting the Compression Ratio value from 100. In this case, 99.98% of the data that would have been required to generate <a href="http://www.cloudflare.com">www.cloudflare.com</a>doesn't need to be transmitted because of the Railgun compression.</p><p>The Origin Processing Time represents the time, in seconds, that Railgun waits for the origin web server to generate the page. In this case, the origin server takes 0.03782 seconds from when the Railgun listener sends the request to the origin to when it responds. If this number is large, it means your web server or database may be hitting a bottleneck that is slowing down its time to render the full page.</p><p>The Railgun Flags represent how a request was processed. The simplified way of looking at the Railgun Flags is to see the 4-digit sequence as zzXz. Ignore the z's and focus on the number or letter in the X position. If it is 3,7, B or F then it means Railgun Compression is working correctly.</p><p>If there is an error of some sort, the Compression Ratio is likely to be listed as "normal" or "direct." This means that Railgun's compression was bypassed for one reason or another. The Railgun Flags help diagnose why. The Railgun Flags are a bitset and, in order to fully interpret them, you need to use the rg-diag utility which is included with the <a href="https://www.cloudflare.com/resources-downloads">Railgun packages</a>. Run the utility from the command line with the -decode option. For example, to decode the Railgun Code 0038, for example, you'd run:</p><p><b>rg-diag -decode=0038</b></p><p>Which returns in:RailgunFlag Existing origin connection reusedRailgun Flag rg-sender sent dictionaryRailgun Flag rg-listener found dictionary</p><p>This information can be useful in diagnosing potential problems with Railgun. The good news is that the Railgun protocol is designed to be resilient. If a connection fails for some reason, in most cases it will immediately roll over to a normal HTTP or HTTPS connection without the visitor seeing an error.</p><p>Finally, returning to the cf-railgun header, the final variable is the Version Number which indicates the version of the Railgun Listener software that is running on the origin server's network. The numbers aren't necessarily sequential, so having a lower number than another Railgun Listener doesn't necessarily mean your Listener is out of date.</p>
    <div>
      <h3>Claire Makes It Easy</h3>
      <a href="#claire-makes-it-easy">
        
      </a>
    </div>
    <p>The Claire Chrome Plugin simplifies the header, leaving out the Railgun Flags and Version Number. Instead, it returns the Railgun Request ID (useful to provide to our support team if there's an issue), the amount of data saved for the particular request (derived from 100 - the Compression Ratio), and the Origin Processing Time (in seconds). Generally, this is all you should need to see whether Railgun is functioning as intended on your site.</p><p>Stay tuned. We'll post more information on tips for getting the most out of Railgun, as well as some of the design and engineering considerations that went into designing the protocol, over the coming days.</p> ]]></content:encoded>
            <category><![CDATA[Railgun]]></category>
            <category><![CDATA[Claire]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Developers]]></category>
            <guid isPermaLink="false">24WcBMjbmal3EbE4ePIV9G</guid>
            <dc:creator>Matthew Prince</dc:creator>
        </item>
    </channel>
</rss>