
<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>Tue, 14 Apr 2026 15:11:45 GMT</lastBuildDate>
        <item>
            <title><![CDATA[Cloudflare is deprecating Railgun]]></title>
            <link>https://blog.cloudflare.com/deprecating-railgun/</link>
            <pubDate>Thu, 01 Jun 2023 13:00:39 GMT</pubDate>
            <description><![CDATA[ Cloudflare will deprecate Railgun on January 2024 ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1IBFHWjg3uScvelj1OHZ75/c644e331d55785b32401b1ca68fbda82/image1-63.png" />
            
            </figure><p>Cloudflare will deprecate the <a href="https://www.cloudflare.com/website-optimization/railgun/">Railgun product</a> on January 31, 2024. At that time, existing Railgun deployments and connections will stop functioning. Customers have the next eight months to migrate to a supported Cloudflare alternative which will vary based on use case.</p><p>Cloudflare first launched Railgun more than ten years ago. Since then, we have released several products in different areas that better address the problems that Railgun set out to solve. However, we shied away from the work to formally deprecate Railgun.</p><p>That reluctance led to Railgun stagnating and customers suffered the consequences. We did not invest time in better support for Railgun. Feature requests never moved. Maintenance work needed to occur and that stole resources away from improving the Railgun replacements. We allowed customers to deploy a zombie product and, starting with this deprecation, we are excited to correct that by helping teams move to significantly better alternatives that are now available in Cloudflare’s network.</p><p>We know that this will require migration effort from Railgun customers over the next eight months. We want to make that as smooth as possible. Today’s announcement features recommendations on how to choose a replacement, how to get started, and guidance on where you can reach us for help.</p>
    <div>
      <h3>What is Railgun?</h3>
      <a href="#what-is-railgun">
        
      </a>
    </div>
    <p>Cloudflare’s reverse proxy <a href="https://www.cloudflare.com/application-services/solutions/">secures and accelerates your applications</a> by placing a Cloudflare data center in over 285+ cities between your infrastructure and your audience. Bad actors attempting to attack your applications hit our network first where products like our WAF and DDoS mitigation service stop them. Your visitors and users connect to our data centers where our cache can serve them content without the need to reach all the way back to your origin server.</p><p>For some customers, your infrastructure also runs on Cloudflare’s network in the form of Cloudflare Workers. Others maintain origin servers running on anything from a Raspberry Pi to a hyperscale public cloud. In those cases, Cloudflare needs to connect to that infrastructure to grab new content that our network can serve from our cache to your audience.</p><p>However, some content cannot be cached. Dynamically-generated or personalized pages can change for every visitor and every session. Cloudflare Railgun <a href="/railgun-in-the-real-world/">aimed to solve</a> that by determining what was the minimum amount of content that changed and attempting to only send that difference in an efficient transfer - a form of <a href="/efficiently-compressing-dynamically-generated-53805/">delta compression</a>. By reducing the amount of content that needed to be sent to Cloudflare’s network, we could accelerate page loads for end users.</p><p>Railgun accomplishes this goal by running a piece of software inside the customer’s environment, the Railgun listener, and a corresponding service running in Cloudflare’s network, the Railgun sender. The pair establish a permanent TCP connection. The listener keeps track of the most recent version of a page that was requested. When a request arrives for a known page, the listener sends an HTTP request to the origin server, determines what content changed, and then compresses and sends only the delta to the sender in Cloudflare’s network.</p>
    <div>
      <h3>Why deprecate a product?</h3>
      <a href="#why-deprecate-a-product">
        
      </a>
    </div>
    <p>The last major release of Railgun took place eight years ago in 2015. However, products should not be deprecated just because active development stops. We believe that a company should retire a product only when:</p><ul><li><p>the maintenance impacts the ability to focus on solving new problems for customers and</p></li><li><p>when improved alternatives exist for customers to adopt in replacement.</p></li></ul><p>Hundreds of customers still use Railgun today and the service has continued to run over the last decade without too much involvement from our team. That relative stability deterred us from pushing customers to adopt newer technologies that solved the same problems. As a result, we kept Railgun in a sort of maintenance mode for the last few years.</p>
    <div>
      <h3>Why deprecate Railgun now?</h3>
      <a href="#why-deprecate-railgun-now">
        
      </a>
    </div>
    <p>Cloudflare’s network has evolved in the eight years since the last Railgun release. We deploy hardware and run services in more than 285 cities around the world, nearly <a href="/panama-expands-cloudflare-network-to-50-countries/">tripling</a> the number of cities since Railgun was last updated. The hardware itself also advanced, becoming more <a href="/the-epyc-journey-continues-to-milan-in-cloudflares-11th-generation-edge-server/">efficient and capable</a>.</p><p>The software platform of Cloudflare’s network developed just as fast. Every data center in Cloudflare’s network can run every service that we provide to our customers. These services range from our traditional reverse proxy products to forward proxy services like Zero Trust to our compute and storage platform Cloudflare Workers. Supporting such a broad range of services requires a platform that can adapt to the requirements of the evolving needs of these products.</p><p>Maintaining Railgun, despite having better alternatives, creates a burden on our ability to continue investing in new solutions. Some of these tools that power Railgun are themselves approaching an end of life state. Others will likely present security risks that we are not comfortable accepting in the next few years.</p><p>We considered several options before deciding on deprecation. First, we could accept the consequences of inaction, leaving our network in a worse state and our Railgun customers in purgatory. Second, we could run Railgun on dedicated infrastructure and silo it from the rest of our network. However, that would violate our principle that every piece of hardware in Cloudflare runs every service.</p><p>Third, we could spin up a new engineering team and rebuild Railgun from scratch in a modern way. Doing so would take away from resources we could otherwise invest in newer technologies. We also believe that existing, newer products from Cloudflare solve the same problems that Railgun set out to address. Rebuilding Railgun would take away from our ability to keep shipping and would duplicate better features already released in other products. As a result, we have decided to deprecate Railgun.</p>
    <div>
      <h3>What alternatives are available?</h3>
      <a href="#what-alternatives-are-available">
        
      </a>
    </div>
    <p>Railgun addressed a number of problems for our customers at launch. Today, we have solutions available that solve the same range of challenges in significantly improved ways.</p><p>We do not have an exact like-for-like successor for Railgun. The solutions that solve the same set of problems have also evolved with our customers. Different use cases that customers deploy Railgun to address will map to different solutions available in Cloudflare today. We have broken out some of the most common reasons that customers used Railgun and where we recommend they consider migrating.</p><p><b>“I use Railgun to maintain a persistent, secure connection to Cloudflare’s network without the need for a static publicly available IP address.”</b>Customers can deploy <a href="https://www.cloudflare.com/products/tunnel/">Cloudflare Tunnel</a> to connect their infrastructure to Cloudflare’s network without the need to expose a public IP address. Cloudflare Tunnel software runs in your environment, similar to the Railgun listener, and creates an outbound-only connection to Cloudflare’s network. Cloudflare Tunnel is available at no cost.</p><p><b>“I use Railgun to front multiple services running in my infrastructure.”</b>Cloudflare Tunnel <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/remote/">can be deployed</a> in this type of bastion mode to support multiple services running behind it in your infrastructure. You can use Tunnel to support services beyond just HTTP servers, and you can deploy replicas of the Cloudflare Tunnel connector for high availability.</p><p><b>“I use Railgun for performance improvements.”</b>Cloudflare has invested significantly in performance upgrades in the eight years since the last release of Railgun. This list is not comprehensive, but highlights some areas where performance can be significantly improved by adopting newer services relative to using Railgun.</p><ul><li><p>Cloudflare Tunnel features Cloudflare’s <a href="https://www.cloudflare.com/pg-lp/argo-smart-routing/">Argo Smart Routing</a> technology, a service that delivers both “middle mile” and last mile optimization, <a href="/argo-v2/">reducing round trip</a> time by up to 40%. Web assets using Argo perform, on average, 30% faster overall.</p></li><li><p><a href="/cloudflare-network-interconnect/">Cloudflare Network Interconnect</a> (CNI) gives customers the ability to directly connect to our network, either virtually or physically, to improve the reliability and performance of the connection between Cloudflare’s network and your infrastructure. CNI customers have a dedicated on-ramp to Cloudflare for their origins.</p></li></ul><p><b>“I use Railgun to reduce the amount of data that egresses from my infrastructure to Cloudflare.”</b>Certain public cloud providers <a href="/aws-egregious-egress/">charge egregious egress</a> fees for you to move your own data outside their environment. We believe that degrades an open Internet and locks in customers. We have spent the last several years investing in ways to reduce or eliminate these altogether.</p><ul><li><p>Members of the <a href="https://www.cloudflare.com/bandwidth-alliance/">Bandwidth Alliance</a> mutually agree to waive transfer fees. If your infrastructure runs in Oracle Cloud, Microsoft Azure, Google Cloud, Backblaze and more than a dozen other providers you pay zero cost to send data to Cloudflare.</p></li><li><p>Cloudflare’s <a href="https://www.cloudflare.com/products/r2/">R2 storage product</a> requires customers to pay zero egress fees as well. R2 provides global object storage with an <a href="https://www.cloudflare.com/developer-platform/solutions/s3-compatible-object-storage/">S3-compatible</a> API and easy migration to give customers the ability to build multi-cloud architectures.</p></li></ul>
    <div>
      <h3>What is the timeline?</h3>
      <a href="#what-is-the-timeline">
        
      </a>
    </div>
    <p>From the time of this announcement, customers have eight months available to migrate away from Railgun. January 31, 2024, will be the last day that Railgun connections will be supported. Starting on February 1, 2024, existing Railgun connections will stop functioning.</p><p>Over the next few days we will prevent new Railgun deployments from being created. Zones with Railgun connections already established will continue to function during the migration window.</p>
    <div>
      <h3>How can I get help?</h3>
      <a href="#how-can-i-get-help">
        
      </a>
    </div>
    <p>Contract customers can reach out to their Customer Success team to discuss additional questions or migration plans. Each of Cloudflare’s regions has a specialist available to help guide teams who need additional help during the migration.</p><p>Customers can also raise questions and provide commentary in <a href="https://community.cloudflare.com/t/cloudflare-is-deprecating-railgun/516753">this dedicated forum room</a>. We will continue to staff that discussion and respond to questions as customers share them.</p>
    <div>
      <h3>What’s next?</h3>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>Railgun customers will also receive an email notice later today about the deprecation plan and timeline. We will continue sending email notices multiple times over the next eight months leading up to the deprecation.</p><p>We are grateful to the Railgun customers who first selected Cloudflare to accelerate the applications and websites that power their business. We are excited to share the latest Cloudflare features with them that will continue to make them faster as they reach their audience.</p> ]]></content:encoded>
            <category><![CDATA[Railgun]]></category>
            <category><![CDATA[Performance]]></category>
            <category><![CDATA[Cloudflare Tunnel]]></category>
            <guid isPermaLink="false">7m4ljf07IEVPS8sEowilh0</guid>
            <dc:creator>Sam Rhea</dc:creator>
        </item>
        <item>
            <title><![CDATA[Ecommerce websites on Cloudflare: best practices]]></title>
            <link>https://blog.cloudflare.com/ecommerce-best-practices/</link>
            <pubDate>Tue, 25 Apr 2017 07:45:00 GMT</pubDate>
            <description><![CDATA[ Cloudflare provides numerous benefits to ecommerce sites, including advanced DDOS protection and an industry-leading Web Application Firewall (WAF) that helps secure your transactions and protect customers’ private data. ]]></description>
            <content:encoded><![CDATA[ <p>Cloudflare provides numerous benefits to <a href="https://www.cloudflare.com/ecommerce/">ecommerce sites</a>, including advanced DDOS protection and an industry-leading <a href="https://www.cloudflare.com/learning/ddos/glossary/web-application-firewall-waf/">Web Application Firewall (WAF)</a> that helps secure your transactions and protect customers’ private data.</p><p>A key Cloudflare feature is caching, which allows content to be served closer to the end user from our global network of data centers. Doing so improves the user's shopping experience and contributes to increasing the proportion of people completing a purchase (conversion rate).</p><p>For example:</p><ul><li><p>Walmart found improving page load time by 1 second increased their conversion rate by 2%</p></li><li><p>Research for Amazon showed every 0.1 second of delay costs 1% of sales</p></li><li><p>The Barack Obama campaign website saw an 80% page load time boost resulted in a 14% increase in donations</p></li></ul>
    <div>
      <h3>What is caching?</h3>
      <a href="#what-is-caching">
        
      </a>
    </div>
    <p>Cloudflare <a href="https://www.cloudflare.com/network/">operates over 110 data centers around the world</a>. When a website implements Cloudflare, visitor requests for the site will proxy through the nearest Cloudflare data center instead of connecting directly to the webserver hosting the site (origin). This means Cloudflare can store content such as images, JavaScript, CSS and HTML on our servers, speeding up access to those resources for end-users.</p><p>Most ecommerce websites rely on a backend database containing product descriptions and metadata such as prices. Without caching, each visit to a product page might involve several database requests to pull all the required data, which can introduce added latency to page load time, particularly on a busy website. Serving the website's homepage and product pages from Cloudflare's cache not only eliminates these costly database calls, but also reduces the load on your origin infrastructure.</p><p>To make the most of Cloudflare and to help maximize the speed of your website, serve as much content as possible from the Cloudflare cache.</p>
    <div>
      <h3>How Cloudflare caching works</h3>
      <a href="#how-cloudflare-caching-works">
        
      </a>
    </div>
    <p>By default, Cloudflare caches static content based on a <a href="https://support.cloudflare.com/hc/en-us/articles/200172516-Which-file-extensions-does-CloudFlare-cache-for-static-content-">fixed list of file extensions</a> which includes assets such as images, CSS files and PDFs.</p><p>The reason Cloudflare only caches static content out of the box (and does not cache HTML content by default) is to avoid the risk of inappropriate data being cached. For example, if the shopping cart page is cached, then the next visitor might receive the cached version and see a cart with the incorrect contents. Therefore, while enabling more caching will let you make the most of Cloudflare, it requires careful and considered implementation.</p><p>Additional caching on Cloudflare can be enabled in one of two ways - using Page Rules or by sending cache headers from your origin. These two methods are explained in more detail <a href="https://support.cloudflare.com/hc/en-us/articles/202775670-How-Do-I-Tell-CloudFlare-What-to-Cache-">here</a>. In this blog post we’ll use Page Rules, but keep in mind you can use headers from your origin too.</p>
    <div>
      <h3>Using caching on ecommerce sites</h3>
      <a href="#using-caching-on-ecommerce-sites">
        
      </a>
    </div>
    <p>A typical HTML page on an ecommerce website will contain static content (such as the product description) and dynamic content such as:</p><ul><li><p>a header section which varies according to the visitor’s logged in state - e.g. if the user is logged in, it may offer the user a “Logged in as..." message</p></li><li><p>a basket section which populates as the user shops on the site</p></li></ul>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/693W6zmtTqjWk76TOCYqCB/ba2c2fb65d96f0b1985f6af9acbdf170/Cloudflare-Ecommerce-Best-Practices.png" />
            
            </figure><p>The user might have one or more session cookies to maintain these dynamic elements.</p><p>There are few ways to make the most of Cloudflare's caching, while taking into account the dynamic nature of ecommerce websites.</p>
    <div>
      <h3>Method 1: cache everything on Cloudflare but bypass the cache for private content</h3>
      <a href="#method-1-cache-everything-on-cloudflare-but-bypass-the-cache-for-private-content">
        
      </a>
    </div>
    <p><i>Note: the Bypass Cache on Cookie feature is only available on the Cloudflare Business and Enterprise </i><a href="https://www.cloudflare.com/plans/"><i>plans</i></a></p><p>Many visitors to a site will be brand new, first time visitors - in other words, they won’t be logged in to the site and won’t have any items in their basket.</p><p>Serving their request from the Cloudflare cache means they can quickly view the page they’re looking for (whether the homepage or a specific product page). As they're a brand new visitor, the entire page can be served from the Cloudflare cache.</p><p>With most ecommerce platforms, as soon as the user logs in to the site or adds an item to basket, a relevant cookie is sent to the browser.</p><p>Cloudflare can cache the pages, but will bypass the cache should Cloudflare receive either of the cookies from the browser.</p><p>This is achieved by introducing a <a href="https://support.cloudflare.com/hc/en-us/articles/200168306-Is-there-a-tutorial-for-Page-Rules-">Page Rule</a> with a “Bypass Cache on Cookie” setting:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2IMt5NxIQXyZGwv8JniGgH/fc7ddf4c27b19c984e804815bbcd0958/pagerulesettings.png" />
            
            </figure><p>In the above example, the Page Rule will cause all requests to the site to serve from cache, unless the web browser has sent a cookie named “loggedin” or “iteminbasket”.</p><p>Obviously every ecommerce platform is different, so always think through your settings and ensure you use the correct cookie values to ensure that there is no risk of private data (e.g. someone’s shopping basket) being served from cache and shown to another visitor.</p>
    <div>
      <h3>Method 2: Populating via JavaScript / AJAX</h3>
      <a href="#method-2-populating-via-javascript-ajax">
        
      </a>
    </div>
    <p>A better solution would be to serve the entirety of the page from cache, but populate the dynamic elements using JavaScript / AJAX.</p><p>This means Cloudflare will serve the bulk of the page content and only small requests will pass (via Cloudflare) direct to origin to populate dynamic elements such as the basket contents.</p><p>To configure this, use a Page Rule with Cache Level “Cache Everything” for the static content and another Page Rule with Cache Level “Bypass” for the dynamic (AJAX) requests.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4WRx5BjGEX5GQ6EUppvg3j/af57c919e57567ae1c6f933a177c7301/page_rules_to_bypass_cache_and_cache.png" />
            
            </figure><p>In this example, any requests going to <code>www.example.com/ajax/basket_contents.php</code> and <code>www.example.com/ajax/logged-in-state.php</code> would match the first Page Rule, which has cache level “Bypass” - Cloudflare will proxy the request but the request won't touch the Cloudflare cache.</p><p>Other requests, e.g. to <code>www.example.com/products/product_page</code> would not match the first Page Rule but would instead match the second “Cache Everything” Page Rule - thus the product page is served from the Cloudflare cache. Within that product page, the dynamic elements (such as the basket contents and the logged in state) are dynamically populated using the AJAX requests.</p><p>You should also consider introducing additional appropriate Page Rules for special pages such as the checkout pages - for example, you may wish to create a Page Rule that bypasses the cache for all the checkout pages.</p><p>Remember: only one Page Rule will execute for any given request, and Page Rules are processed in the order they exist in the Cloudflare control panel. Read over our <a href="https://support.cloudflare.com/hc/en-us/articles/200168306-Is-there-a-tutorial-for-Page-Rules-">Page Rules tutorial</a> to better understand how they work.</p>
    <div>
      <h3>Optimizing further: using Railgun</h3>
      <a href="#optimizing-further-using-railgun">
        
      </a>
    </div>
    <p><i>Note: the Railgun feature is only available on the Cloudflare Business and Enterprise </i><a href="https://www.cloudflare.com/plans/"><i>plans</i></a></p><p>Cloudflare’s Railgun technology optimizes the connection between Cloudflare and the website origin, for accelerating dynamic HTML content - content that can't be served from the Cloudflare cache.</p><p>Railgun helps in two ways:</p><ul><li><p>Establishing a persistent connection between Cloudflare and the website origin (to speed up initial connection times)</p></li><li><p>Compressing the data that passes from the origin to Cloudflare by only sending content that has changed</p></li></ul><p>Before Railgun:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4ooTWlxFNJ60jWwvzKEy1P/ee1a734c9c1021d84556e048558f6789/railgun-diagram-how-it-works-without.svg" />
            
            </figure><p>After Railgun:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4uX10OAM7zEqKm80XibrHk/f9d89979ed91184eec0bd20b7d04dbc2/railgun-diagram-how-it-works-with.svg" />
            
            </figure><p>Railgun can happily be used in conjunction with the previously discussed caching methods.</p><p>If you’ve implemented method 1 (the bypass cache on cookie method) then Railgun will accelerate the requests which pass directly to origin due to the presence of the relevant bypass cache cookies.</p><p>Method 2 (caching everything on Cloudflare except AJAX calls to populate dynamic sections) is already more efficient than method 1. Railgun can still be used to further accelerate the AJAX requests that pass from Cloudflare to origin.</p><p>Railgun is a little more advanced as it requires installation of a small software package on (or very close to) the origin webserver to handle the compression. You can <a href="https://www.cloudflare.com/website-optimization/railgun/">read more about Railgun here</a> and find the <a href="https://www.cloudflare.com/docs/railgun/">installation documentation here</a>.</p><p>Ideally a <a href="https://www.cloudflare.com/solutions/ecommerce/optimization/">well optimized ecommerce website</a> will leverage our caching service as much as possible - serving images, CSS and JavaScript from Cloudflare's network, in addition to as much static HTML content as possible. Adding our Railgun service to accelerate those inevitable non-cachable requests to the origin webserver will help create a fantastic, speedy shopping experience for your customers.</p> ]]></content:encoded>
            <category><![CDATA[eCommerce]]></category>
            <category><![CDATA[Page Rules]]></category>
            <category><![CDATA[Railgun]]></category>
            <category><![CDATA[JavaScript]]></category>
            <category><![CDATA[DDoS]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[WAF]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Cache]]></category>
            <category><![CDATA[Best Practices]]></category>
            <guid isPermaLink="false">6pRC8uOyLFDKH8RZahQ2WD</guid>
            <dc:creator>Nick B</dc:creator>
        </item>
        <item>
            <title><![CDATA[Caching Anonymous Page Views]]></title>
            <link>https://blog.cloudflare.com/caching-anonymous-page-views/</link>
            <pubDate>Mon, 12 Dec 2016 17:15:19 GMT</pubDate>
            <description><![CDATA[ The load time of your website not only affects your search engine rankings, but is also correlated to the conversion rate on your site. ]]></description>
            <content:encoded><![CDATA[ <p></p><p> <i>M42 Smart Motorway in the West Midlands, UK; courtesy of </i><a href="https://www.flickr.com/photos/highwaysengland/17222688041/in/album-72157658694793213/"><i>Highways England</i></a><i>.</i></p><p>The load time of your website not only affects your search engine rankings, but is also correlated to the conversion rate on your site:</p><ul><li><p>Walmart.com <a href="http://www.webperformancetoday.com/2012/02/28/4-awesome-slides-showing-how-page-speed-correlates-to-business-metrics-at-walmart-com/">found</a> that for every 1 second of page speed improvement, they experienced a 2% increase in conversion rate.</p></li><li><p>Greg Linden's presentation <a href="http://www.gduchamp.com/media/StanfordDataMining.2006-11-28.pdf">Make Data Useful</a> demonstrated through A/B Testing every 100ms in page load time delays led to a 1% loss of sales for Amazon.</p></li><li><p>Kyle Rush from the 2011 Obama for America campaign site showed a 3 second page load speed improvement <a href="https://moz.com/blog/how-to-improve-your-conversion-rates-with-a-faster-website">increased on-site donations</a> by 14% (resulting in over $34 million in donations).</p></li></ul><p>Cloudflare is determined to help website administrators boost the performance of their websites. From today, Cloudflare users on our Business plan will gain a previously Enterprise-only Page Rule option, “Bypass Cache on Cookie”. When used in conjunction with a “Cache Everything” Page Rule, this setting allows for websites to cache the HTML of anonymous page visits without affecting dynamic content.</p><p>By caching anonymous page views, Cloudflare is able to help ensure that your origin webserver doesn't waste time constantly regenerating pages which change rarely. This ultimately allows us to reduce load on your server and reduce load times when users reach your site.</p>
    <div>
      <h3>Caching HTML</h3>
      <a href="#caching-html">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/61o2qXoqWmX9UNbIploYzf/b4ea23ecf98deebbdc918bb1163297d4/bypass-cache-cookie-wordpress.png" />
            
            </figure><p>Cloudflare <a href="https://support.cloudflare.com/hc/en-us/articles/200172516-Which-file-extensions-does-CloudFlare-cache-for-static-content-">automatically caches static resources</a> such as JavaScript, CSS and Images. Additionally, it is possible on all plans to instruct Cloudflare to cache static HTML using a “Cache Everything” Page Rule.</p><p>With static HTML, it is easy to work out what should and should not be cached - the response is exactly the same from request-to-request. However, this gets more complicated when you put a login form and a shopping cart into the mix. Once the user logs-in or adds a product to their shopping cart, the HTML being rendered is then personalised to them.</p><p>As HTTP is a stateless protocol; in order for a web application to determine which users need dynamic content, cookies are used. When the “Bypass Cache on Cookie” rule is matched, Cloudflare will bypass the “Cache Everything” rule and fetch HTML from the origin. Where a cookie is not set, Cloudflare abide by the "Cache Everything" rule and will seek to cache the static HTML for a given request.</p><p>Our Bypass Cache on Cookie setting allows for wildcard (“.*”) operators and OR pipe operators (“|”). Additionally, you are able to customise the cache TTL on our servers using the “Edge Cache TTL” option in Page Rule settings.</p><p>When your anonymous page views change, you can purge the cache using our web interface, our API or our <a href="https://www.cloudflare.com/integrations/">platform integrations</a>.</p><p>We have a number of tutorials on our Knowledge Base on how you can set this up with a variety of platforms:</p><ul><li><p><a href="https://support.cloudflare.com/hc/en-us/articles/236166048">Caching Anonymous Page Views with WordPress or WooCommerce</a></p></li><li><p><a href="https://support.cloudflare.com/hc/en-us/articles/236168808">Caching Anonymous Page Views with Magento 1 and Magento 2</a></p></li><li><p><a href="https://support.cloudflare.com/hc/en-us/articles/200172256-How-do-I-cache-static-HTML-">How do I cache static HTML?</a></p></li></ul><p>Want to go further? This setting can be used in conjunction with the <a href="https://www.cloudflare.com/website-optimization/railgun/">Railgun web optimizer</a>, which can speed up the delivery of dynamic content that cannot be cached.</p><p>Above this, Cloudflare’s Enterprise users have the option of taking their caching to the next level by using our Custom Cache Key functionality alongside other Page Rule options such as “Cache by Device Type” or “Cache on Cookie”.</p> ]]></content:encoded>
            <category><![CDATA[Page Rules]]></category>
            <category><![CDATA[Railgun]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Cache]]></category>
            <guid isPermaLink="false">306UtO4EPYrdw9mtZqBP0n</guid>
            <dc:creator>Junade Ali</dc:creator>
        </item>
        <item>
            <title><![CDATA[What's inside net/http? Late binding in the Go standard library]]></title>
            <link>https://blog.cloudflare.com/whats-inside-net-http-socket-late-binding-in-the-go-standard-library/</link>
            <pubDate>Mon, 21 Dec 2015 14:30:48 GMT</pubDate>
            <description><![CDATA[ It's well known that we're heavy users of the Go programming language at CloudFlare. Our work often involves delving into the standard library source code to understand internal code paths, error handling and performance characteristics. ]]></description>
            <content:encoded><![CDATA[ <p>It's well known that we're heavy users of the Go programming language at CloudFlare. Our work often involves delving into the standard library source code to understand internal code paths, error handling and performance characteristics.</p><p>Recently, I looked at how the standard library's built-in HTTP client handles connections to remote servers in order to provide minimal roundtrip latency.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/Bjh7RemFgAymGt06VoKi6/cb8339189b010180f0fd37da6b121eb1/11940908695_cea0865524_o-1.jpg" />
            
            </figure><p><a href="https://creativecommons.org/licenses/by/2.0/">CC By 2.0</a> <a href="https://www.flickr.com/photos/deanhochman/11940908695/">Image</a> by <a href="https://www.flickr.com/photos/deanhochman/">Dean Hochman</a></p>
    <div>
      <h3>Connection pooling</h3>
      <a href="#connection-pooling">
        
      </a>
    </div>
    <p>A common pattern that aims to avoid connection setup costs (such as the TCP handshake and TLS setup) and confer control over the number of concurrently established connections is to pool them. <code>net/http</code> maintains a pool of connections to each remote host which supports <code>Connection: keep-alive</code>. The <a href="https://golang.org/src/net/http/transport.go#L42">default size</a> of the pool is two idle connections per <a href="https://golang.org/src/net/http/transport.go#L743">remote host</a>.</p><p>More interestingly, when you make a request with <code>net/http</code>, a race happens. Races in code are often an unwanted side effect, but in this case it's intentional. Two goroutines operate in parallel: one that tries to dial a connection to the remote host, and another which tries to retrieve an idle connection from the connection pool. The fastest goroutine wins.</p><p>To illustrate, let's look at the <a href="https://golang.org/src/net/http/transport.go#L187">code executed</a> when <code>transport.RoundTrip(req)</code> is called:</p>
            <pre><code>go func() {
    pc, err := t.dialConn(cm)
    dialc &lt;- dialRes{pc, err}
}()

idleConnCh := t.getIdleConnCh(cm)

select {
case v := &lt;-dialc:
    // Our dial finished.
    return v.pc, v.err
case pc := &lt;-idleConnCh:
    // Another request finished first and its net.Conn
    // became available before our dial. Or somebody
    // else's dial that they didn't use.
    // But our dial is still going, so give it away
    // when it finishes:
    handlePendingDial()
    return pc, nil
case &lt;-req.Cancel:  
    handlePendingDial()
    return nil, errors.New("net/http: request canceled while waiting for connection")
case &lt;-cancelc:  
    handlePendingDial()
    return nil, errors.New("net/http: request canceled while waiting for connection")
}</code></pre>
            <p>First a connection is dialed, then we select over <code>idleConnCh</code> (down which idle connections are passed) or <code>dialc</code>, which gives us the result of the dial. Cancellation of the request is also possible if the caller decides <code>RoundTrip</code> has taken too long.</p>
    <div>
      <h3>Late binding</h3>
      <a href="#late-binding">
        
      </a>
    </div>
    <p>So if an idle connection is available, retrieving it from the pool should win against dialing a new one. A similar approach (alongside other optimizations) has been used in Chromium, where it's referred to as <a href="https://insouciant.org/tech/connection-management-in-chromium/">late binding</a>.</p><p>This echoes a mechanism we use in <a href="https://www.cloudflare.com/railgun/">Railgun</a>, CloudFlare's dynamic content optimizer, to ensure that an incoming request is serviced as quickly as possible. Idle connections to the Railgun component running at an origin server are periodically pruned after a timeout or may be closed because of errors, so an established connection from CloudFlare's edge is not always available. In this case, a direct request is made without Railgun whilst, in parallel, a persistent connection is initiated for use by subsequent requests.</p><p>As long as you have confidence that your connection manager is capable of cleaning up bad connections and cancelled requests properly, connection pooling and late binding can be important in reducing roundtrip latency. <a href="https://golang.org/pkg/sync/#Pool">sync.Pool</a> in the standard library may be a useful starting point if you need to pool something other than HTTP connections.</p><p>If you found this exploration interesting, we're <a href="https://www.cloudflare.com/join-our-team/">hiring engineers in London, San Francisco and Singapore</a>.</p> ]]></content:encoded>
            <category><![CDATA[Go]]></category>
            <category><![CDATA[Programming]]></category>
            <category><![CDATA[Railgun]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <guid isPermaLink="false">5YTek3m8V13gVgNGSFTbYI</guid>
            <dc:creator>Matthew C</dc:creator>
        </item>
        <item>
            <title><![CDATA[Simple Helix chooses CloudFlare to ignite white-hot Magento performance]]></title>
            <link>https://blog.cloudflare.com/simple-helix-chooses-cloudflare-to-ignite-white-hot-magento-performance/</link>
            <pubDate>Tue, 01 Sep 2015 17:04:32 GMT</pubDate>
            <description><![CDATA[ Some months ago, we made a big bet on partnering with CloudFlare for performance improvements and website security for our Magento hosting customers. Customer experience is core to our business and relying on another company is a major deal.  ]]></description>
            <content:encoded><![CDATA[ <p><i>Today’s guest blogger is George Cagle. George is a system administrator at Simple Helix, a CloudFlare partner.</i></p><p>Some months ago, we made a big bet on partnering with CloudFlare for performance improvements and website security for our Magento hosting customers. Customer experience is core to our business and relying on another company is a major deal. CloudFlare is now included in Default–On mode for select Simple Helix hosting plans and can be added to any existing plan. The results have been great and we wanted to share a couple successes with the rest of the CloudFlare community.</p>
    <div>
      <h3>Testing the waters</h3>
      <a href="#testing-the-waters">
        
      </a>
    </div>
    <p>The first thing one notices after melding their site with the worldwide CloudFlare <a href="https://www.cloudflare.com/features-cdn">CDN network</a> is just how fast a website becomes. In Simple Helix’s testing, we found that proper CloudFlare implementation can yield 100% speed increases, and an even faster 143% speed increase when paired with the <a href="https://www.cloudflare.com/railgun">Railgun™</a> web optimizer for dynamic content.</p><p>Adding CloudFlare will certainly improve performance, but it can also significantly improve security through the <a href="https://www.cloudflare.com/waf">Web Application Firewall</a> <a href="https://www.cloudflare.com/waf"></a>feature. The security benefits of having the CloudFlare service can be seen after just the first few days of adoption as outlined below:</p><p>Total number of threats mitigated by CloudFlare in a week</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7NsKnptazEMY2zHX8ibJ5/e868d404812e487313adbd0d614d4f97/image_0.png" />
            
            </figure><p>The results provided insight: "CloudFlare helped break down the problem in an elegant way that made threat assessments much easier for our customers to digest and make well-reasoned decisions based on the information presented" said Brian Rorex, systems administrator at Simple Helix. CloudFlare protects sites from some of the most common maladies that plague the modern Internet like overly-aggressive crawler bots, botnet attacks, and DDoS attacks.</p>
    <div>
      <h3>Getting results</h3>
      <a href="#getting-results">
        
      </a>
    </div>
    <p>Given our happiness with the performance of the CloudFlare service, we have chosen it to respond to some unique performance challenges of our customers with much success. One such Simple Helix client is a popular fashion accessory company that let us know that they were launching a high-traffic media campaign that would increase traffic significantly for several days. We responded by putting them on CloudFlare as their first step in bolstering the company's infrastructure in preparation for the big day. When the tweet finally hit the internet and the traffic ramped up, CloudFlare and the servers hardly broke a sweat, reducing the effective bandwidth usage at the origin by almost 70%.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1hvNetMi85ACNUto4fKWDw/b050d5ce7d9bd40755e40bc8e948608f/image_1.png" />
            
            </figure><p>Another Simple Helix customer with a popular apparel store routinely saw 300-500% spikes in traffic during regular sales events. Nesting their web servers behind the CloudFlare CDN evened out the traffic to an almost flat bandwidth usage graph and provided an 83.4% bandwidth savings at the origin server.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3qMTtUyEGJ79ObmlgFcyVm/caf912f0fd083ec81f96b2e017ebfc6c/image_2.png" />
            
            </figure><p>Simple Helix is one of the leading hosting providers serving the Magento e-commerce market with over 100,000 domains. Our customers vary from mom and pop shops to internationally recognized brands. A young, rapidly growing company, Simple Helix is constantly on the look-out for new technology that will improve the quality of service for their customers and set them apart from the pack.</p><p>We’re excited to make CloudFlare a standard part of setup at Simple Helix. This means that our customers get the performance and security benefits of CloudFlare without any additional work. If you currently run an eCommerce store that could take advantage of what we have to offer, please contact <a href="https://manage.simplehelix.com/submitticket.php?step=2&amp;deptid=2&amp;__hstc=86869831.707593530589295e70264e08352f1582.1435944664030.1439996175366.1439999612847.67&amp;__hssc=86869831.1.1439999612847&amp;__hsfp=2729578089">the Simple Helix team</a> to find out which plan is right for you.</p> ]]></content:encoded>
            <category><![CDATA[Railgun]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Compression]]></category>
            <category><![CDATA[WAF]]></category>
            <category><![CDATA[Optimization]]></category>
            <category><![CDATA[Partners]]></category>
            <guid isPermaLink="false">7moWo2v1ykcY0tAqOmGxP5</guid>
            <dc:creator>Guest Author</dc:creator>
        </item>
        <item>
            <title><![CDATA[Railgun v5 has landed: better, faster, lighter]]></title>
            <link>https://blog.cloudflare.com/railgun-v5-has-landed/</link>
            <pubDate>Mon, 31 Aug 2015 22:31:51 GMT</pubDate>
            <description><![CDATA[ Three years ago we launched Railgun, CloudFlare's origin network optimizer. Railgun allows us to cache the uncacheable to accelerate the connection between CloudFlare and our customers' origin servers.  ]]></description>
            <content:encoded><![CDATA[ <p>Three years ago we launched <a href="https://www.cloudflare.com/railgun">Railgun</a>, CloudFlare's origin network optimizer. Railgun allows us to <a href="/cacheing-the-uncacheable-cloudflares-railgun-73454/">cache the uncacheable</a> to accelerate the connection between CloudFlare and our customers' origin servers. That brings the benefit of a CDN to even dynamic content with no need for 'fast purging' or other tricks. With Railgun even dynamic, ever-changing pages benefit from caching.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4tGSSOyLcACP5qioD3Ssol/ef4edbd58835782afb34061a085b3e2f/2300190277_360853ae0d_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/thatguyfromcchs08/2300190277/in/photolist-4vg5r4-at4qz-oMjmcq-wnQ3p-dTxa4e-5otM4s-4dqdHU-9saDQZ-cu6Fc-4Pmroo-sBSNuJ-9dehck-ngDfDT-nUu6YR-5UgoU2-6jneZb-3a4fyp-7YsAXD-bZtZaN-a8M5vq-bEKeA8-GhFjt-roySGp-i14jSw-cAPypE-87LoH-5Uy3NF-6M6Pse-rVtN9-cfdeos-bfMtZP-u3Zw2b-8N97Uu-jamkM-7x2csx-7RyBfo-ibekvp-ibepqt-a6B8Ss-je9ZR9-toS7kJ-9tNfaF-5gt9Wg-6UbNjh-aCPkJ1-RvxwP-8qkQfq-9ndbXy-7HqKEz-4me8vi">image</a> by <a href="https://www.flickr.com/photos/thatguyfromcchs08/">Nathan E Photography</a></p><p>Over those three years Railgun has been deployed widely by our customers to accelerate the delivery of their web sites and <a href="/railgun-gives-our-ecommerce-sites-the-edge/">lower</a> their bandwidth costs.</p><p>Today we're announcing the availability of Railgun v5 with a number of significant improvements:</p>
    <div>
      <h4>We've substantially reduced memory utilization and CPU requirements</h4>
      <a href="#weve-substantially-reduced-memory-utilization-and-cpu-requirements">
        
      </a>
    </div>
    <p>Railgun performs delta compression on every request/response requiring CPU (to perform the compression) and memory (to keep a cache of pages to delta against). Version 5 has undergone extensive optimization based on the performance of Railgun on large web sites and at hosting providers. Version 5 requires much less memory and lower CPU.</p>
    <div>
      <h4>A new, lighter weight, faster wire protocol</h4>
      <a href="#a-new-lighter-weight-faster-wire-protocol">
        
      </a>
    </div>
    <p>The original Railgun wire protocol that transfer requests and compressed responses between the customer server and CloudFlare's infrastructure has been completely replaced with a new, lighter-weight completely binary protocol that is faster and uses less bandwidth.</p>
    <div>
      <h4>An extra layer of compression</h4>
      <a href="#an-extra-layer-of-compression">
        
      </a>
    </div>
    <p>We noticed in real-world tests that although delta compression provided <a href="/railgun-in-the-real-world/">incredible compression</a> and faster page load times that it was possible to squeeze out even greater compression by performing traditional non-delta compression in addition to the delta compression. This is now standard and all content is compressed yielding an extra 10-15% compression.</p>
    <div>
      <h4>Streaming mode for large downloads</h4>
      <a href="#streaming-mode-for-large-downloads">
        
      </a>
    </div>
    <p>Large downloads are not delta compressed for performance reasons (the benefits of the delta compression are outweighed by the cost of compressing very large pages). To ensure that large pages are downloaded as quickly as possible, Railgun v5 provides an automatic streaming mode where the page is streamed from the origin server across the Internet to CloudFlare and on to the end web browser. This substantially reduces the time to download very large pages through Railgun.</p>
    <div>
      <h4>Better utilization of origin web server connections</h4>
      <a href="#better-utilization-of-origin-web-server-connections">
        
      </a>
    </div>
    <p>Railgun's management of the connection between Railgun and the customer origin server has been improved to pool connections and make best use of HTTP keep-alives. This reduces the load on the origin server and improves performance as connections are efficiently reused resulting in lower latency.</p>
    <div>
      <h4>Improved cryptographic infrastructure</h4>
      <a href="#improved-cryptographic-infrastructure">
        
      </a>
    </div>
    <p>CloudFlare has been moving all communication between servers to encrypted connections. Railgun has always used a TLS connection between CloudFlare and the customer server even if the requests being passed were HTTP and not HTTPS. With version 5 we've switched Railgun to use our new CA for greater security. The connection between CloudFlare and the customer's Railgun is <a href="/how-to-build-your-own-public-key-infrastructure/">secured with certificates in both directions</a> that are verified against the CloudFlare CA.</p>
    <div>
      <h4>Optimized partners</h4>
      <a href="#optimized-partners">
        
      </a>
    </div>
    <p>CloudFlare Optimized Partners in particular can benefit from the lower resource usage of Railgun version 5. A2 Hosting, an Optimized Partner and Railgun Beta participant, reported increased compression rates using version 5. Also new for partners is the ability to assign subdomains to a Railgun. Upgrading to the latest version, or installing Railgun for the first time, only takes a few minutes (<a href="https://www.cloudflare.com/static/media/downloads/optimized-partner-rg-quick.pdf">Railgun Quick Start Guide</a> for Optimized Partners). Railgun is perfect for ecommerce sites as well as news sites and popular blogs.</p>
    <div>
      <h4>Install or upgrade today</h4>
      <a href="#install-or-upgrade-today">
        
      </a>
    </div>
    <p>Railgun is available as part of CloudFlare's Business and Enterprise plans or from an Optimized Partner. <a href="https://www.cloudflare.com/resources-downloads#railgun">Installation instructions for Railgun</a> are available on CloudFlare's resources and downloads page. We recommend installing from <a href="https://pkg.cloudflare.com">CloudFlare's package repository</a>, which makes it easy to keep Railgun up-to-date. This release also sees Railgun available on Red Hat Enterprise Linux (RHEL) and CentOS 7. Railgun v5's configuration is completely compatible with version 4 and customers can simply replace the Railgun binary and restart to use version 5 and immediately see the benefits.</p> ]]></content:encoded>
            <category><![CDATA[Railgun]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Compression]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Speed]]></category>
            <category><![CDATA[Partners]]></category>
            <guid isPermaLink="false">65AObM1ggWI7puGROpTutw</guid>
            <dc:creator>John Graham-Cumming</dc:creator>
        </item>
        <item>
            <title><![CDATA[CloudFlare hiring Go programmers in London and San Francisco]]></title>
            <link>https://blog.cloudflare.com/cloudflare-needs-go-programmers-in-london-and-san-francisco/</link>
            <pubDate>Tue, 19 Aug 2014 04:32:00 GMT</pubDate>
            <description><![CDATA[ Are you familiar with the Go programming language and looking for a job in San Francisco or London? Then think about applying to CloudFlare. We're looking for people with experience writing Go in both locations. ]]></description>
            <content:encoded><![CDATA[ <p>Are you familiar with the <a href="http://golang.org/">Go</a> programming language and looking for a job in San Francisco or London? Then think about <a href="https://www.cloudflare.com/join-our-team">applying</a> to CloudFlare. We're looking for people with experience writing Go in both locations.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4W517sORRfjpcKf7B3ikEH/5e5af3c7efb1aef0f0c3a74ac1415ed0/6779040884_3f7bfeaf89_z_1.jpg" />
            
            </figure><p>CC BY-SA 2.0 by <a href="https://www.flickr.com/photos/yukop/">Yuko Honda</a> (cropped, resized)</p><p>CloudFlare uses Go extensively to build our service and we need to people to build and maintain those systems. We've written a complete <a href="/what-weve-been-doing-with-go/">DNS server</a> in Go, our <a href="/go-at-cloudflare">Railgun</a> service is all Go and we're moving more and more systems to Go programs.</p><p>We've recently written about our open source <a href="/red-october-cloudflares-open-source-implementation-of-the-two-man-rule/">Red October</a> Go project for securing secrets, and open-sourced our <a href="/introducing-cfssl/">CFSSL</a> Go-based PKI package. Go is now making its way into our data pipeline and be used for processing huge amounts of data.</p><p>We even have a <a href="http://cloudflare.github.io/#cat-Go">Go-specific section</a> on our GitHub.</p><p>If you're interested in working in Go on a high-performance global network like CloudFlare, send us an <a href="#">email</a>.</p><p>Not into Go? We're hiring for <a href="https://www.cloudflare.com/join-our-team">all sorts</a> of other positions and technologies.</p> ]]></content:encoded>
            <category><![CDATA[United Kingdom]]></category>
            <category><![CDATA[Life at Cloudflare]]></category>
            <category><![CDATA[Go]]></category>
            <category><![CDATA[Programming]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Railgun]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Reliability]]></category>
            <guid isPermaLink="false">7FVhXIqx7osQOAw1Rup2yQ</guid>
            <dc:creator>John Graham-Cumming</dc:creator>
        </item>
        <item>
            <title><![CDATA[Welcome to Miami: HostingCon 2014]]></title>
            <link>https://blog.cloudflare.com/welcome-to-miami-hostingcon-2014/</link>
            <pubDate>Wed, 28 May 2014 13:15:00 GMT</pubDate>
            <description><![CDATA[ This year’s HostingCon will be held in Miami Beach, and the CloudFlare team is busy prepping. This is our fourth year at the show and our team is excited to see partners, customers and friends. ]]></description>
            <content:encoded><![CDATA[ <p>This year’s HostingCon will be held in Miami Beach, and the CloudFlare team is busy prepping. This is our fourth year at the show and our team is excited to see partners, customers and friends.</p><p>You bring the sunscreen, we’ll supply:</p><ul><li><p>Complimentary <b>limousine transfers</b> from Miami International Airport to Loews Miami Beach Hotel on Sunday, June 15. <a href="https://www.cloudflare.com/limo">Reserve your spot today</a>.</p></li><li><p>CloudFlare <b>t-shirts</b></p></li><li><p><b>Live music</b> during breakfast each morning to start your day off right</p></li><li><p>Our signature <b>Nerf Railguns</b> (quantity is limited: be sure to visit us early at booth #407!)</p></li></ul><p>As it happens, this will be my first HostingCon, I've just joined CloudFlare as Partner Account Manager. Stop by to say hi to me and the team and learn about our new features and products.</p><p>If you’re <a href="https://www.cloudflare.com/hosting-partners">interested in becoming a partner</a>, please drop by the CloudFlare Booth #407 to learn how CloudFlare can reduce your server load; improve the performance of your network; block spammers, botnets, and other web threats; and provide DDOS protection.</p><p>Here’s where the CloudFlare Team will be during the show:</p>
    <div>
      <h4>Sunday, June 15</h4>
      <a href="#sunday-june-15">
        
      </a>
    </div>
    <ul><li><p>Limo transfers from Miami International Airport to Loews Miami Beach Hotel. Registration is open, <a href="https://www.cloudflare.com/limo">reserve your spot now</a>.</p></li></ul>
    <div>
      <h4>Monday, June 16</h4>
      <a href="#monday-june-16">
        
      </a>
    </div>
    <ul><li><p>7:45am-8:45am: Breakfast, sponsored by CloudFlare - Level 2 of the convention center (there will be signs)</p></li><li><p>5:30pm-8:30pm: Welcome Reception</p></li></ul>
    <div>
      <h4>Tuesday, June 17</h4>
      <a href="#tuesday-june-17">
        
      </a>
    </div>
    <ul><li><p>7:45am-8:45am: Breakfast, sponsored by CloudFlare - Level 2 of the convention center</p></li><li><p>12:30pm-6:30pm: Exhibit hall is open. CloudFlare is booth #407</p></li><li><p>4:00pm-6:30pm: Happy hour! Visit our booth while you sip on your preferred beverage</p></li></ul>
    <div>
      <h4>Wednesday, June 18</h4>
      <a href="#wednesday-june-18">
        
      </a>
    </div>
    <ul><li><p>7:45am-8:45am: Breakfast, sponsored by CloudFlare - Level 2 of the convention center</p></li><li><p>12:30pm-4:00pm: Exhibit hall is open. CloudFlare is booth #407</p></li></ul><p>We’ll see you in Miami!</p> ]]></content:encoded>
            <category><![CDATA[Life at Cloudflare]]></category>
            <category><![CDATA[Hosting Con]]></category>
            <category><![CDATA[Events]]></category>
            <category><![CDATA[SWAG]]></category>
            <category><![CDATA[Railgun]]></category>
            <category><![CDATA[Florida]]></category>
            <category><![CDATA[Partners]]></category>
            <guid isPermaLink="false">KT3wdx2Nw5h108idiGvRh</guid>
            <dc:creator>Ashley Gorringe</dc:creator>
        </item>
        <item>
            <title><![CDATA[What we've been doing with Go]]></title>
            <link>https://blog.cloudflare.com/what-weve-been-doing-with-go/</link>
            <pubDate>Mon, 11 Nov 2013 01:00:00 GMT</pubDate>
            <description><![CDATA[ Almost two years ago CloudFlare started working with Go. What started as an experiment on one network and concurrency heavy project has turned into full, production use of Go for multiple services. ]]></description>
            <content:encoded><![CDATA[ <p>Almost two years ago CloudFlare started working with Go. What started as an experiment on one network and concurrency heavy project has turned into full, production use of Go for multiple services. Today Go is at the heart of CloudFlare's services including handling compression for high-latency HTTP connections, our entire DNS infrastructure, SSL, load testing and more.</p><p>I first wrote about CloudFlare's use of <a href="/go-at-cloudflare">Go back in July 2012</a>. At that time there was only one CloudFlare project, <a href="https://www.cloudflare.com/railgun">Railgun</a>, written in Go, but others were starting to germinate around the company. Today we have many major projects in Go. So, we celebrate Go's <a href="http://blog.golang.org/4years">4th birthday</a> with a short list of interesting things we've written in Go.</p>
    <div>
      <h3>RRDNS</h3>
      <a href="#rrdns">
        
      </a>
    </div>
    <p>RRDNS is a DNS proxy that was written to help scale CloudFlare's DNS infrastructure. Our DNS was <a href="/cloudflare-fastest-free-dns-among-fastest-dns">already very fast</a> and we wanted to make it faster, more reliable and resilient to attack.</p><p>RRDNS provides response rate limiting to stop DNS attacks, caching to lower the load on the database, load balancing to detect downed upstreams, seamless binary upgrade (with no service interruption), CNAME flattening and more. It is built on a modular framework that allows the implementation of each behaviour to exist in separately maintained modules.</p><p>This modularity was trivial to enforce with interfaces, allowing each module to remain strictly self-contained but retain the flexibility of implementation (some use cgo, others have background workers). A goroutine is dedicated to each request to force isolation where panics are recovered and logged instead of crashing the server.</p><p>The guarantees needed to avoid leaving the server in a bad state when handling panics would be impossible without the defer mechanism Go provides. Other language features simplified the complexity of writing new modules; garbage collection allows us to avoid complex reference counting schemes and concentrate on the business logic. Managing the concurrent requests' access to shared data was also easy, either by wrapping this in a goroutine or using read-write locks.</p>
    <div>
      <h3>Railgun</h3>
      <a href="#railgun">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4WoNHpcKK14wLSsSifQYQA/f3f1098e66124cf8185ab2d5ea1fd0f6/railgun.png.scaled500_1.png" />
            
            </figure><p>Railgun is CloudFlare's compression technology that's used to speed up connections between CloudFlare's data centers and origin web servers (especially when there is high latency between them). It's 100% written in Go and performs on the fly compression of web pages (and other textual assets) against recent versions of those pages to send the absolute minimum data possible.</p><p>Railgun also helps cache <a href="/cacheing-the-uncacheable-cloudflares-railgun-73454">previously uncacheable</a> assets (such as dynamically generated web pages) by spotting the often small changes between web pages over time, or the small changes between different users. Railgun is now widely used by CloudFlare customers to create responsive web sites wherever the end user is in the world.</p><p>It is now widely used by CloudFlare customers and <a href="https://www.cloudflare.com/cloudflare-partners-self-serve-program-open-beta/">hosting partners</a> and achieves impressive <a href="/railgun-in-the-real-world">real world speedups</a>, including faster TTFB and better page load time, and <a href="/railgun-gives-our-ecommerce-sites-the-edge">bandwidth savings</a> which translate into additional savings for people using services like AWS.</p>
    <div>
      <h3>Red October</h3>
      <a href="#red-october">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5bgG5mznimQuyVwyYePpnb/278dfca284fd8d75acde787f39942bee/The_Hunt_for_Red_October-1.jpg" />
            
            </figure><p>Red October is a cryptographically secure implementation of the <a href="https://en.wikipedia.org/wiki/Two-man_rule">two-man rule</a> control mechanism. It is a software-based encryption and decryption server. The server allows authorized individuals to encrypt a payload in such a way that no one individual can decrypt it. To decrypt the payload, at least two authorized individuals must be logged into the server. The decryption of the payload is cryptographically tied to the login credentials of the authorized individuals and is only kept in memory for the duration of the decryption.</p><p>We'll be using Red October to secure very sensitive material (such as private encryption keys) so that no single CloudFlare employee (or single attacker) can get access to them. In coming months we'll write more about the cryptographic underpinnings of keeping CloudFlare secure.</p>
    <div>
      <h3>SSL Bundler</h3>
      <a href="#ssl-bundler">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4ISeaNc9XgwhFEpdVP8Mce/33527712a89e3fa7bef47095259f00a9/chain.jpg.scaled500_1.jpg" />
            
            </figure><p>The SSL Bundler allows us to take a customer's own <a href="https://www.cloudflare.com/application-services/products/ssl/">SSL certificate</a> and compute the <a href="/what-we-just-did-to-make-ssl-even-faster">fastest, shortest chain of intermediate certificates</a> that can be used to verify the connection. When someone uploads a custom SSL certificate, we use our directory of intermediate certificates to build all the possible chains from the uploaded cert to a trusted browser root. We then rank these chains based on a number of factors including:</p><ol><li><p>The length of the certificate chain</p></li><li><p>The ubiquity of the root certificate in browsers and other clients</p></li><li><p>The security of each step in the chain (e.g., does their Extended Key Usage include Server Authentication)</p></li><li><p>The length of the validity period of all the steps in the chain</p></li></ol><p>The result is a server bundle that is small, fast and strong while having ubiquitous browser and client support. We then present that chain of certificates when an SSL connection is made so that the browser can securely verify the SSL connection as quickly as possible.</p>
    <div>
      <h3>And that's not all</h3>
      <a href="#and-thats-not-all">
        
      </a>
    </div>
    <p>We're also experimenting with Go-based software like CoreOS (we're working with their go-raft library) and Docker. We have internal tools for load testing written in Go for Kyoto Tycoon, HTTP servers, SPDY and memcached. And we've open-sourced our <a href="https://github.com/cloudflare/go-stream">Go stream processing library</a>, a Go wrapper for <a href="https://github.com/cloudflare/golog">high-performance syslogging</a>, our changes to Go <a href="https://github.com/cloudflare/gokabinet">bindings for Kyoto Cabinet</a>, and a tool for <a href="https://github.com/cloudflare/gurl">'curling' SPDY</a> sites. And, of course, we've been contributing directly to Go itself.</p><p>All in all Go is one of the main languages in use at CloudFlare and from here it looks like it has a bright future.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3nLQBFNBDHtGXjroUxDBbE/81eeb7497ee1b27c25cfdc36be62718d/Screen_Shot_2013-11-11_at_9.04.31_PM.png" />
            
            </figure><p>Happy 4th Birthday Go!</p><p>(And, yes, we're <a href="https://www.cloudflare.com/join-our-team">hiring Go programmers</a> in London and San Francisco)</p> ]]></content:encoded>
            <category><![CDATA[RRDNS]]></category>
            <category><![CDATA[Go]]></category>
            <category><![CDATA[Railgun]]></category>
            <category><![CDATA[Reliability]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Speed]]></category>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">6ak1VHCm9sHvuEl8nH4xB4</guid>
            <dc:creator>John Graham-Cumming</dc:creator>
        </item>
        <item>
            <title><![CDATA[Recycling memory buffers in Go]]></title>
            <link>https://blog.cloudflare.com/recycling-memory-buffers-in-go/</link>
            <pubDate>Sat, 24 Aug 2013 01:46:00 GMT</pubDate>
            <description><![CDATA[ This blog post is very old now. You probably don't want to use the techniques described here. GO'S sync.Pool is a better way to go. ]]></description>
            <content:encoded><![CDATA[ <p><b>THIS BLOG POST IS VERY OLD NOW. YOU PROBABLY DON'T WANT TO USE THE TECHNIQUE DESCRIBED HERE. GO'S </b><a href="https://golang.org/pkg/sync/#Pool"><b>sync.Pool</b></a><b> IS A BETTER WAY TO GO.</b></p><p>The other day I wrote about our use of Lua to <a href="/cloudflares-new-waf-compiling-to-lua">implement our new Web Application Firewall</a>. The other language that's become very popular at CloudFlare is <a href="http://golang.org/">Go</a>. In the past, I've written about <a href="/go-at-cloudflare">how we use Go</a> to write network services including <a href="/cacheing-the-uncacheable-cloudflares-railgun-73454">Railgun</a>.</p><p>One of the operational challenges of using a garbage-collected language like Go for long-running network services is memory management.</p><p>To understand Go's memory management it's necessary to dig a little into the Go run-time code. There are two separate processes that take care of identifying memory that is no longer used by the program (that's garbage collection) and returning memory to the operating system when it doesn't look like it will be used again (that's called scavenging in the Go code).</p><p>Here's a small program that creates a lot of garbage. Once a second it asks for a byte array of between 5,000,000 and 10,000,000 bytes. It keeps a pool of 20 of these buffers around and discards others. This program is designed to simulate something that happens quite often in programs: memory is allocated by different parts of the program over time, some of it is retained, most of it is no longer needed. In a networked Go program this can easily happen with goroutines that handle network connections or requests. It's common to have goroutines that allocate blocks of memory (such as slices to store received data) and then no longer need them. Over time there will be some number of blocks of memory in use by network connections that are being handled and accumulated garbage from connections that have come and gone.</p><p>package main</p><p>import ("fmt""math/rand""runtime""time"
)</p><p>func makeBuffer() []byte {return make([]byte, rand.Intn(5000000)+5000000)}</p><p>func main() {pool := make([][]byte, 20)</p>
            <pre><code>var m runtime.MemStats  
makes := 0  
for {  
    b := makeBuffer()  
    makes += 1
    i := rand.Intn(len(pool))
    pool\[i\] = b

    time.Sleep(time.Second)

    bytes := 0

    for i := 0; i &lt; len(pool); i++ {
        if pool\[i\] != nil {
            bytes += len(pool\[i\])
        }
    }

    runtime.ReadMemStats(&amp;m)
    fmt.Printf("%d,%d,%d,%d,%d,%d\\n", m.HeapSys, bytes, m.HeapAlloc,
        m.HeapIdle, m.HeapReleased, makes)
}</code></pre>
            <p>}</p><p>The program uses the <a href="http://golang.org/pkg/runtime/#ReadMemStats">runtime.ReadMemStats</a> function to get information about the size of the heap. It prints out four values: <code>HeapSys</code> (the number of bytes the program has asked the operating system for), <code>HeapAlloc</code> (the number of bytes currently allocated in the heap), <code>HeapIdle</code> (the number of bytes in the heap that are unused) and <code>HeapReleased</code> (the number of bytes returned to the operating system).</p><p>Garbage collection runs frequently in a Go program (see the <code>GOGC</code> environment variable to understand how to control the garbage collector's operation), so when running the size of the heap will change as memory is spotted as unused: this will causes <code>HeapAlloc</code> and <code>HeapIdle</code> to change over time. The scavenger will only release memory that has been unused for more than 5 minutes so <code>HeapReleased</code> does not change often.</p><p>Here's a chart of the program above running for ten minutes.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/76nenz8v0eyxrZHmIti2zW/0304ac9ad9c4af487ba7afc40c074807/garbage.png" />
            
            </figure><p>(On this and subsequent charts the left axis in in bytes and the right axis is a count used for Make Count)</p><p>The red line shows the number of bytes that are actually in byte buffers in the pool. Because it has a fixed size of 20 buffers it quickly plateaus at around 150,000,000 bytes. The top blue line shows the amount of memory request from the operating system; it plateaus at around 375,000,000 bytes. So the program is using about 2.5x the amount of memory it needs.</p><p>As the program is churning through memory the allocated size of the heap and the amount of idle memory jumps around as garbage collection occurs. The orange line just counts the number of times <code>makeBuffer()</code> has been called to create a new buffer.</p><p>This sort of over request of memory is common in garbage collected programs (see, for example, the paper <a href="http://cs.canisius.edu/~hertzm/gcmalloc-oopsla-2005.pdf">Quantifying the Performance of Garbage Collection vs. Explicit Memory Management</a>). As the program churns through memory the idle memory gets reused and rarely gets released to the operating system.</p><p>One way to solve this problem is to perform some memory management manually in the program. For example, using a channel it's possible to keep a separate pool of buffers that are no longer used and use that pool to retrieve a buffer (or make a new one if the channel is empty).</p><p>The program can then be rewritten as follows:</p><p>package main</p><p>import (
"fmt"
"math/rand"
"runtime"
"time"
)</p><p>func makeBuffer() []byte {
return make([]byte, rand.Intn(5000000)+5000000)
}</p><p>func main() {
pool := make([][]byte, 20)</p>
            <pre><code>buffer := make(chan \[\]byte, 5)

var m runtime.MemStats
makes := 0
for {
    var b \[\]byte
    select {
    case b = &lt;-buffer:
    default:
        makes += 1
        b = makeBuffer()
    }

    i := rand.Intn(len(pool))
    if pool\[i\] != nil {
        select {
        case buffer &lt;- pool\[i\]:
            pool\[i\] = nil
        default:
        }
    }

    pool\[i\] = b

    time.Sleep(time.Second)

    bytes := 0
    for i := 0; i &lt; len(pool); i++ {
        if pool\[i\] != nil {
            bytes += len(pool\[i\])
        }
    }

    runtime.ReadMemStats(&amp;m)
    fmt.Printf("%d,%d,%d,%d,%d,%d\\n", m.HeapSys, bytes, m.HeapAlloc,
        m.HeapIdle, m.HeapReleased, makes)
}</code></pre>
            <p>}</p><p>And here's a graph of its operation for 10 minutes:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5SJYyQrsi4WUg9Vdg8xxvx/a9da773d3b0ad6238f20aca96d2a8172/garbage-pool.png" />
            
            </figure><p>This tells a very different story from above. The memory actually in pool is very close to the memory requested from the operating system and the garbage collector has little to no work to do. The heap only has a very small amount of idle memory that eventually gets released to the operating system.</p><p>The key to the operation of this memory recycling mechanism is a buffered channel called <code>buffer</code>. In the code above it can store 5 <code>[]byte</code> slices. When the program needs a buffer it first tries to read one from the channel using a <code>select</code> trick:</p><p>select {
case b = &lt;-buffer:
default:
b = makeBuffer()
}</p><p>This will never block because if the channel called <code>buffer</code> has a slice in it then the first case works and the slice is placed in <code>b</code>. If the channel is empty (meaning a receive would block) the <code>default</code> case happens a new buffer is allocated.</p><p>Putting slices back in the channel uses a similar non-blocking trick:</p><p>select {
case buffer &lt;- pool[i]:
pool[i] = nil
default:
}</p><p>If the <code>buffer</code> channel is full then a send to it would block. In that case the empty <code>default</code> clause occurs. This simple mechanism can be used to safely make a shared pool. It can even be shared across goroutines since channel communication is perfectly safe from multiple goroutines.</p><p>We actually use a similar technique to this in our Go programs. The actual recycler (in simplified form) is shown below. It works by having a goroutine that handles the creation of buffers and shares them across goroutines in our software. Two channels <code>get</code> (to get a new buffer) and <code>give</code> (to return a buffer to the pool) are used for all communication.</p><p>The recycler keeps a linked list of returned buffers and periodically throws away those that are too old and are unlikely to be reused (in the example code that's buffers that are older than one minute). That allows the program to cope with bursts of demand for buffers dynamically.</p><p>package main</p><p>import (
"container/list"
"fmt"
"math/rand"
"runtime"
"time"
)</p><p>var makes int
var frees int</p><p>func makeBuffer() []byte {
makes += 1
return make([]byte, rand.Intn(5000000)+5000000)
}</p><p>type queued struct {
when time.Time
slice []byte
}</p><p>func makeRecycler() (get, give chan []byte) {
get = make(chan []byte)
give = make(chan []byte)</p>
            <pre><code>go func() {
    q := new(list.List)
    for {
        if q.Len() == 0 {
            q.PushFront(queued{when: time.Now(), slice: makeBuffer()})
        }

        e := q.Front()

        timeout := time.NewTimer(time.Minute)
        select {
        case b := &lt;-give:
            timeout.Stop()
            q.PushFront(queued{when: time.Now(), slice: b})

       case get &lt;- e.Value.(queued).slice:
           timeout.Stop()
           q.Remove(e)

       case &lt;-timeout.C:
           e := q.Front()
           for e != nil {
               n := e.Next()
               if time.Since(e.Value.(queued).when) &gt; time.Minute {
                   q.Remove(e)
                   e.Value = nil
               }
               e = n
           }
       }
   }

}()

return</code></pre>
            <p>}</p><p>func main() {
pool := make([][]byte, 20)</p>
            <pre><code>get, give := makeRecycler()

var m runtime.MemStats
for {
    b := &lt;-get
    i := rand.Intn(len(pool))
    if pool\[i\] != nil {
        give &lt;- pool\[i\]
    }

    pool\[i\] = b

    time.Sleep(time.Second)

    bytes := 0
    for i := 0; i &lt; len(pool); i++ {
        if pool\[i\] != nil {
            bytes += len(pool\[i\])
        }
    }

    runtime.ReadMemStats(&amp;m)
    fmt.Printf("%d,%d,%d,%d,%d,%d,%d\\n", m.HeapSys, bytes, m.HeapAlloc
         m.HeapIdle, m.HeapReleased, makes, frees)
}</code></pre>
            <p>}</p><p>Running that program for ten minutes looks very similar to the second program above:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1Ob2nuz31JU6rVynv82T7z/1391c2e044d550e9386f374fa814c1b5/garbage-recyler.png" />
            
            </figure><p>These techniques can be used to recycle memory that the programmer knows is likely to be reused without asking the garbage collector to do the work. They can significantly reduce the amount of memory a program needs. And they can be used for more than just byte slices. Any arbitrary Go type (user-defined or not) could be recycled in a similar manner.</p> ]]></content:encoded>
            <category><![CDATA[Firewall]]></category>
            <category><![CDATA[Go]]></category>
            <category><![CDATA[Reliability]]></category>
            <category><![CDATA[Railgun]]></category>
            <guid isPermaLink="false">4FKJQfY0bVapDOAt43dGiK</guid>
            <dc:creator>John Graham-Cumming</dc:creator>
        </item>
        <item>
            <title><![CDATA[Railgun Gives our Ecommerce Sites the Edge]]></title>
            <link>https://blog.cloudflare.com/railgun-gives-our-ecommerce-sites-the-edge/</link>
            <pubDate>Mon, 15 Jul 2013 15:00:00 GMT</pubDate>
            <description><![CDATA[ In March 2013, we started testing Railgun, and slowly rolled it out across our three web properties. We saw immediate results. First, we saw instant reductions in time to retrieve uncached HTML documents, and as an ecommerce web property every millisecond counts. ]]></description>
            <content:encoded><![CDATA[ <p></p><p><i>The following is a guest blog post by </i><a href="http://www.linkedin.com/in/chrisholland"><i>Chris Holland</i></a><i>, Director of Technology at </i><a href="http://www.luxurylink.com/"><i>Luxury Link</i></a><i>. Luxury Link has been using CloudFlare’s </i><a href="http://www.cloudflare.com/railgun/"><i>Railgun acceleration technology</i></a><i> since March 2013.</i></p><p>In March 2013, we started testing Railgun, and slowly rolled it out across our three web properties. We saw immediate results.</p><p>First, we saw instant reductions in time to retrieve uncached HTML documents, and as an <a href="https://www.cloudflare.com/ecommerce/">ecommerce web property</a> every millisecond counts. Using Railgun, the HTML for our home page (hosted in Los Angeles, California) loads 40 percent faster from the East Coast in the United States. Measurements we've run from London showed a 2x speedup, which is invaluable in positioning ourselves as a global player in the travel industry.</p><p>Second, we saw a reduction in outbound bandwidth from our origin web servers. Because Railgun does compression between the origin server and CloudFlare’s data centers, our bandwidth needs were dramatically reduced. This is especially important for our business because sudden peaks of traffic are commonplace.</p><p>We had tried other dynamic acceleration products offered by top-tier CDNs, but the results weren't as good and they cost a lot more than the CloudFlare Business plan.</p><p>Railgun, to put it mildly, was rather impressive.</p>
    <div>
      <h3>Bandwidth: Before and After</h3>
      <a href="#bandwidth-before-and-after">
        
      </a>
    </div>
    <p>We had the sneaking suspicion that Railgun's delta compression algorithm might have a noticeable impact on outbound bandwidth consumption out of our data center. In fact, it was more than noticeable!</p><p>In the chart below, the green line shows our outbound bandwidth consumption over a six month period. You can see that before we turned Railgun on in March, there are many spikes. Post-March, the spikes disappear.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4t1FdWM6x2riXcMBVLMfgs/c776a94ebddf03164adb3a2073fab1c6/6-months-before-after-Railgun.png" />
            
            </figure><p>It is important to note that with or without Railgun enabled, all of our HTML documents are delivered using gzip encoding. All our images, stylesheets and scripts are cached in CloudFlare data centers; as such they barely factor in the outbound bandwidth consumption. It's for the most part fair to state that our outbound bandwidth consumption is solely comprised of the retrieval of uncached HTML documents.</p><p>For us, this is why Railgun makes such a difference on top of the <a href="https://www.cloudflare.com/learning/cdn/what-is-a-cdn/">traditional CDN benefits</a>. Railgun is accelerating and compressing the parts of the site that a normal CDN just can't handle. By accelerating the delivery of ‘uncacheable’ HTML pages, our visitors are getting better response times and we are seeing a big decrease in outbound bandwidth.</p>
    <div>
      <h3>Bandwidth Before Railgun: Inbound vs. Outbound Ratio</h3>
      <a href="#bandwidth-before-railgun-inbound-vs-outbound-ratio">
        
      </a>
    </div>
    <p>This chart shows the inbound (orange line) and outbound (green line) bandwidth on February 6, 2013, before we introduced Railgun. It shows a pretty typical story for us: dramatic peaks in traffic linked to specific email campaigns.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7fGev8Eca4TOz0YAjaj6Tc/a8da0a372d36ab9d70bc46757be80ffe/graphs-feb.png" />
            
            </figure><p>The data shows that our outbound bandwidth is between 5x and 10x our inbound. That's pretty typical of gzipped HTTP traffic serving mostly HTML: inbound traffic is made up of HTTP requests, most of which fit in a packet or two, while outbound traffic is made up of all the actual HTML documents in response to those requests.</p><p>Our peak traffic often comes from email campaigns sending users to some of our largest HTML documents, which is why we're more likely to come in at a 10:1 ratio. Off-peak outbound is still about 5x inbound traffic, and reflects a longer tail of smaller HTML documents from more organic browsing.</p>
    <div>
      <h3>Bandwidth With Railgun: Inbound vs. Outbound Ratio</h3>
      <a href="#bandwidth-with-railgun-inbound-vs-outbound-ratio">
        
      </a>
    </div>
    <p>Next take a look at this chart from May 8, 2013, with CloudFlare Railgun running on our site:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1GKMMlK5ygAO9Hqeb4wc4y/a7127e31e1f709af916eba7e720b152b/graphs-may.png" />
            
            </figure><p>Railgun shines when many users access a handful of similar URIs, which is the pattern of our peak traffic. Even though the documents being returned are different in subtle ways for each user, those unique subtleties are the only bits of information exiting our data center. Think "diffs." Railgun essentially flattens our peaks: going from a 10:1 ratio to a 1:1 ratio, our peak outbound traffic is 1/10th of what it used to be before Railgun.</p><p>Off-peak outbound traffic, which is the longer-tail organic browsing, is also down to a 3:1 ratio from a 5:1 ratio without Railgun.</p>
    <div>
      <h3>International Expansion</h3>
      <a href="#international-expansion">
        
      </a>
    </div>
    <p>After much hard work internationalizing our platforms, we were extremely thrilled to launch our site in the UK just before July 4th: <a href="http://www.luxurylink.co.uk/">http://www.luxurylink.co.uk</a>. As we expand internationally, our audience will continue to grow geographically further from our data center located in Los Angeles, California, and Railgun will have an even greater impact by ensuring less data has to travel over increasing distances. Our UK site is also backed by Railgun.</p>
    <div>
      <h3>Give it a Try</h3>
      <a href="#give-it-a-try">
        
      </a>
    </div>
    <p>While Railgun is likely to have a different impact for every application based on trafficked URIs and heterogeneity of documents, our observations would indicate that the impact for most web applications will fall somewhere between "noticeable" and "unbelievable."</p><p>Looking at these numbers, Railgun ought to be extremely attractive to cloud-hosted companies, such as people using services like Heroku, AWS or the Rackspace Cloud, as well as anyone paying for every single byte transferred in and out of their applications.</p>
    <div>
      <h3>Looking Ahead</h3>
      <a href="#looking-ahead">
        
      </a>
    </div>
    <p>I would love to one day see Railgun's "edge agents" implemented as Chrome, Firefox, or Safari extensions. Right now, while very significant in terms of percentage, Railgun's acceleration is only marginally "felt" by end-users: full HTML documents are still sent to end-users from CloudFlare's edges. Picture a day when this "diff'ing" technology gets baked into the web browser, such that a web property becomes faster as you browse it because you're rarely ever retrieving a full HTML document for a given request, but rather a small HTML fragment which might fit in a single packet.</p><p>Dreaming up possibilities afforded by CloudFlare's platforms could be a full-time occupation. But before getting too far ahead of ourselves, <a href="http://www.cloudflare.com/railgun/">Railgun</a> as it stands today ought to be wildly transformative to the Internet and the many businesses that operate online. It certainly is to us.</p> ]]></content:encoded>
            <category><![CDATA[eCommerce]]></category>
            <category><![CDATA[Railgun]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <guid isPermaLink="false">5Dwvpy5liTmVieEoULvXWV</guid>
            <dc:creator>Guest Author</dc:creator>
        </item>
        <item>
            <title><![CDATA[CloudFlare will be at HostingCon 2013 in Full Force]]></title>
            <link>https://blog.cloudflare.com/cloudflare-hostingcon-2013/</link>
            <pubDate>Wed, 12 Jun 2013 08:00:00 GMT</pubDate>
            <description><![CDATA[ The CloudFlare team will be at HostingCon 2013 in Austin next week. This is our third year at the show and we have a lot of things in store for partners.

 ]]></description>
            <content:encoded><![CDATA[ <p></p><p>The CloudFlare team will be at HostingCon 2013 in Austin next week. This is our third year at the show and we have a lot of things in store for partners.</p><p>Here's a sneak peek:</p><ul><li><p>Complimentary limousine transfers from Austin-Bergstrom International Airport to the Hilton Austin hotel on Sunday, June 16th. <a href="https://www.google.com/url?q=https%3A%2F%2Fwww.cloudflare.com%2Flimo&amp;sa=D&amp;sntz=1&amp;usg=AFQjCNHvmKdlDYhI-0cmz54liIf5W3hekw">Reserve your spot today!</a></p></li><li><p>New CloudFlare tshirts</p></li><li><p>Live music to supercharge your day during breakfast each morning</p></li><li><p>Charging stations at our booth (#523) to keep your devices supercharged</p></li><li><p>Bigger and better Nerf Railguns. There is limited quantity, so be sure to visit us at booth #523 to get your Railgun</p></li></ul>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/M9J6rMxA2Mg2mcONd6NbI/75b288df6cab425ddcf9c81c54ec06f5/railgunboxes.jpg" />
            
            </figure><p>CloudFlare Railguns ready for HostingCon 2013</p><p>We are looking forward to connecting with our current partners and meeting new partners at the show. If you are already a CloudFlare Certified Partner, be sure to stop by and introduce yourself. If you are not a partner yet, stop by to learn more about how CloudFlare can reduce your server load, improve the performance of your network, block spammers, botnets and other web threats, and provide DDOS protection. <a href="https://www.google.com/url?q=https%3A%2F%2Fwww.cloudflare.com%2Fpartner-programs&amp;sa=D&amp;sntz=1&amp;usg=AFQjCNFqG-DtICixbGAp5BeU_a410Io4-w">More details about the CloudFlare Certified Partner program here</a>.</p><p>Here's where the CloudFlare team will be all week:</p>
    <div>
      <h4>Sunday, June 16th</h4>
      <a href="#sunday-june-16th">
        
      </a>
    </div>
    <p>Limo transfers from Austin-Bergstrom International Airport to the Hilton Austin Hotel.</p><p><a href="https://www.cloudflare.com/limo"><i>Registration is still open, reserve your spot now!</i></a></p>
    <div>
      <h4>Monday, June 17th</h4>
      <a href="#monday-june-17th">
        
      </a>
    </div>
    <ul><li><p>7:45am-8:45am: CloudFlare sponsored breakfast located in the Level 4, Ballroom D Foyer - <a href="http://www.google.com/url?q=http%3A%2F%2Fwww.alternatorjones.com&amp;sa=D&amp;sntz=1&amp;usg=AFQjCNGn_JmZ_PqP6NCdUan331YiKFhfZw">Live music by Alternator Jones</a></p></li><li><p>5:00pm onwards: Come find the CloudFlare team at the welcome reception!</p></li></ul>
    <div>
      <h4>Tuesday, June 18th</h4>
      <a href="#tuesday-june-18th">
        
      </a>
    </div>
    <ul><li><p>7:45am-8:45am: CloudFlare sponsored breakfast located in the Level 4, Ballroom D Foyer - <a href="http://www.reverbnation.com/jackievenson">Live music by Jackie Venson</a></p></li><li><p>12:00pm-4:00pm: CloudFlare is in Exhibit Hall 4 at booth #523</p></li><li><p>4:00pm-6:30pm: Visit our booth during the exhibit hall happy hour for a beverage and to supercharge your mobile phone!</p></li></ul>
    <div>
      <h4>Wednesday, July 18th</h4>
      <a href="#wednesday-july-18th">
        
      </a>
    </div>
    <ul><li><p>8:00am-10:00am: CloudFlare sponsored breakfast located in the Level 4, Ballroom D Foyer - <a href="http://www.reverbnation.com/seanevan">Live music by Sean Evan</a></p></li><li><p>9:00am-9:45am: Our co-founder and CEO Matthew Prince will be speaking on the IPv6 panel discussion <i>"Now is the Time for IPv6"</i> in room #18D</p></li><li><p>9:00-9:45am: Maria Karaivanova and John Roberts from CloudFlare will be co-hosting a talk on partnerships, <i>"Strategies for Successful Partnerships"</i> in room #16</p></li><li><p>12:00-4:00pm: CloudFlare is in Exhibit Hall 4 at Booth #523</p></li></ul><p>Connect with us on Twitter during the event to find out where we are and what's coming up next:<a href="https://twitter.com/search/%23HostingCon">#hostingcon</a>, <a href="https://twitter.com/hostingcon">@hostingcon</a>, <a href="https://twitter.com/CloudFlare">@CloudFlare</a></p><p>See you in Austin!</p> ]]></content:encoded>
            <category><![CDATA[Events]]></category>
            <category><![CDATA[Austin]]></category>
            <category><![CDATA[Hosting Con]]></category>
            <category><![CDATA[SWAG]]></category>
            <category><![CDATA[Railgun]]></category>
            <category><![CDATA[Texas]]></category>
            <guid isPermaLink="false">6x1Gx6ivZthLDUhCAZrxxl</guid>
            <dc:creator>Kristin Tarr</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>
        <item>
            <title><![CDATA[CloudFlare's Railgun: Easier Than Ever]]></title>
            <link>https://blog.cloudflare.com/cloudflares-railgun-easier-than-ever/</link>
            <pubDate>Tue, 26 Feb 2013 08:51:00 GMT</pubDate>
            <description><![CDATA[ Over the next few days we have a number of announcements regarding CloudFlare's Railgun technology. We wanted to begin, however, with what is in some ways the end: the ways in which you can take advantage of Railgun yourself. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Over the next few days we have a number of announcements regarding CloudFlare's Railgun technology. We wanted to begin, however, with what is in some ways the end: the ways in which you can take advantage of Railgun yourself. Today we're proud to announce two ways in which you can make your dynamic content faster than was ever possible before.</p>
    <div>
      <h3>Do It Yourself</h3>
      <a href="#do-it-yourself">
        
      </a>
    </div>
    <p>First, today CloudFlare is announcing version 3.3.3 of Railgun. This version has been battle tested on high-traffic sites including <a href="http://www.imgur.com/">Imgur</a> and <a href="http://www.4chan.org/">4chan</a>. It's run billions of requests in a number of different environments through the new protocol and we're ready to push it out to the world. To make the process of installing Railgun easy, we've released RPMs for most the popular Linux and BSD variants including:</p><ul><li><p>Ubuntu 12.10</p></li><li><p>Ubuntu 12.04</p></li><li><p>Ubuntu 11.10</p></li><li><p>Ubuntu 10.04</p></li><li><p>FreeBSD 9</p></li><li><p>FreeBSD 8</p></li><li><p>CentOS 6</p></li><li><p>CentOS 5</p></li><li><p>Debian 6</p></li></ul><p>You can download any of these RPMs via the <a href="http://www.cloudflare.com/resources-downloads">CloudFlare Downloads page</a>. In addition, we've released an Amazon Machine Instance (AMI) for Amazon Web Services that you can install if you want to have you own Railgun listener. The AMI will be available soon via the AWS AMI manager.</p><p>The largest platform we're missing is Windows Server and we are working on updates to the Go runtime in order to allow us to compile for that platform and meet our quality standards. For the Windows Server users out there, stay tuned. We haven't forgotten about you.</p>
    <div>
      <h3>But Wait, There's More</h3>
      <a href="#but-wait-theres-more">
        
      </a>
    </div>
    <p>But that's not the really exciting part. We're extremely excited to announce that a majority of the world's leading hosting providers are now supporting CloudFlare's Railgun technology. These 30 hosting providers have already registered to be CloudFlare Optimized Hosts. That means you can enable Railgun, usually with a single click and without having to install any software or change any of your code. Within the next few days, all of the following hosts will be supporting CloudFlare's Railgun:</p><ul><li><p><a href="http://www.040hosting.eu/">040hosting</a></p></li><li><p><a href="http://www.a2hosting.com/">A2 Hosting</a></p></li><li><p><a href="http://www.arvixe.com/">Arvixe</a></p></li><li><p><a href="http://www.bluehost.com/">Bluehost</a></p></li><li><p><a href="http://byethost.com/">ByetHost</a></p></li><li><p><a href="http://www.corecommerce.com/">CoreCommerce</a></p></li><li><p><a href="http://dreamhost.com/">DreamHost</a></p></li><li><p><a href="http://elserver.com/">ELServer</a></p></li><li><p><a href="http://www.fastdomain.com/">FastDomain</a></p></li><li><p><a href="http://www.greengeeks.com/">GreenGeeks</a></p></li><li><p><a href="http://www.hostpapa.com/">HostPapa</a></p></li><li><p><a href="http://www.hostmonster.com/">HostMonster</a></p></li><li><p><a href="http://www.justhost.com/">Just Host</a></p></li><li><p><a href="http://www.interserver.net/">InterServer</a></p></li><li><p><a href="http://www.mapletime.com/">MapleTime</a></p></li><li><p><a href="http://mediatemple.net/">(mt) Media Temple</a></p></li><li><p><a href="http://www.mddhosting.com/">MDDHosting</a></p></li><li><p><a href="http://www.namecheap.com/">NameCheap</a></p></li><li><p><a href="http://www.pacifichost.com/">PacificHost</a></p></li><li><p><a href="http://www.proisp.no/">PRO ISP</a></p></li><li><p><a href="http://www.siteground.com/">SiteGround</a></p></li><li><p><a href="http://www.sliqua.com/">Sliqua Enterprise Hosting</a></p></li><li><p><a href="http://www.softcloud.co.uk/">Softcloud Hosting</a></p></li><li><p><a href="https://www.sparkred.com/">SparkRed</a></p></li><li><p><a href="https://ventraip.com.au/">VentraIP</a></p></li><li><p><a href="http://vexxhost.com/">VEXXHOST</a></p></li><li><p><a href="http://www.webhostingbuzz.com/">WebHostingBuzz</a></p></li><li><p><a href="http://www.webhostingpad.com/">WebHostingPad</a></p></li><li><p><a href="http://x10hosting.com/">x10Hosting</a></p></li><li><p><a href="http://zuver.net.au/">Zuver</a></p></li></ul><p>In most cases, if you're already hosted with one of these hosting providers, getting the benefits of Railgun is free for you. If you're using one of these hosts, look for an option in your control panel to enable Railgun. If you're not already using one of these hosts, but you want to use Railgun, you should either contact your hosting provider to <a href="https://www.cloudflare.com/partner-programs">become a CloudFlare Optimized Partner</a>, or consider switching to one of the providers above.</p><p>Railgun is a revolutionary new protocol that makes dynamic web performance significantly faster and less bandwidth-intensive than was ever previously possible. Over the next few days, we'll be releasing more details about the protocol. In the meantime, we wanted to make sure you knew where you could go to get Railgun today if you're interested. Stay tuned for more.</p> ]]></content:encoded>
            <category><![CDATA[Railgun]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">62QTw9Wi8XDZArbpsfkodI</guid>
            <dc:creator>Matthew Prince</dc:creator>
        </item>
        <item>
            <title><![CDATA[Railgun in the real world: faster web page load times]]></title>
            <link>https://blog.cloudflare.com/railgun-in-the-real-world/</link>
            <pubDate>Fri, 21 Dec 2012 10:50:00 GMT</pubDate>
            <description><![CDATA[ To solve that problem CloudFlare came up with a delta compression technique that recognizes that even dynamically-generated or personalized pages change only a little over time or between users. ]]></description>
            <content:encoded><![CDATA[ <p>In past blog posts I've described <a href="/cacheing-the-uncacheable-cloudflares-railgun-73454">CloudFlare's Railgun technology</a> that is designed to greatly speed up the delivery of non-cached pages. Although CloudFlare caches about 65% of the resources needed to make up a page, something like 35% can't be cached because they are dynamically generated or marked as 'do not cache'. And those 35% are often the initial HTML of the page that must be downloaded before anything else.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3bDwufBiCCxIajC6vbarF6/e91397b76b20571087dd7f030e5cbe63/cacheing-the-uncacheable-cloudflares-railgun-73454.png.scaled500.png" />
            
            </figure><p>To solve that problem CloudFlare came up with a <a href="/efficiently-compressing-dynamically-generated-53805">delta compression</a> technique that recognizes that even dynamically-generated or personalized pages change only a little over time or between users. Railgun uses that compression technique to greatly reduce the amount of data that is sent over the Internet to CloudFlare's data centers from backend web servers. The result is faster delivery of the critical HTML that the browser must receive before it can download the rest of the page.</p><p>Testing with Railgun showed that very large compression ratios were possible and they resulted in a large speedup in page delivery. But two questions remained: "what's the effect in the real world?" and "how much difference does that make to page load time?".</p><p>We're now able to give some answers to those questions. The first hosting partner to roll out Railgun is <a href="http://vexxhost.com/">Montreal-based Vexxhost</a>. They gave us a sample of 51 web sites that they've enabled Railgun on and allowed us to run performance tests to see what difference Railgun makes. We decided to measure three things: how much faster the HTML is delivered, what the compression ratio is and how much page load time changes.</p><p>To get useful numbers we decided to load pages multiple times (each page was loaded 20 times with and without Railgun for a total of 40 downloads) and median values were used. Testing was done by downloading the pages from a machine in London, UK. The median round trip time between the nearest CloudFlare data center (where Railgun was running) and the origin web servers was 78ms.</p>
    <div>
      <h3>HTML Delivery Speedup, Time To First Byte and Compression Ratio</h3>
      <a href="#html-delivery-speedup-time-to-first-byte-and-compression-ratio">
        
      </a>
    </div>
    <p>On the 51 sites supplied by Vexxhost we saw a median speedup on downloading the HTML of 1.43x. To put that another way that means that the median time to download the HTML of the web pages decreased to 70% of what it was without Railgun.</p><p>Of the 51 sites 11 saw a speedup up of greater than 2x (i.e. the time to download the HTML of the web page more than halved) and for 8 of the sites the speedup was greater than 3x (i.e. the time to download the HTML of the web page was cut to a third of the original).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1MQ3rn7thf0tato2wYYS2j/83ea53412903b1e0fad2f850bccd830b/median_change_HTML_download.png.scaled500.png" />
            
            </figure><p>The median compression ratio achieved by Railgun was 0.65% (i.e. the page was reduced to 0.65% of its size). Of the 51 sites, only 9 saw a compression ratio greater than 3% (i.e. most of the pages were reduced to just a tiny percentage of their original size).</p><p>It's this huge compression that enables Railgun to speedup HTML delivery dramatically. </p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3jhggDoUwn7vTEhM8tMuBm/f2b8a7c1766606dc5d880062f8c8b266/median_compression.png.scaled500.png" />
            
            </figure><p>Another measurement to look at is Time To First Byte (how long it takes for the first byte of a page to be delivered to the browser). This is measured as the time from starting the TCP connection to the server to the moment the first byte is received from the server. Railgun has an effect on TTFB as well. The median improvement in TTFB was to drop it to 90% of the non-Railgun-accelerated value.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/p2DGpvW8pGa63vMrZwbvC/1f223fcc38ed6a14d478f4430f42b9f1/ttfb.png.scaled500.png" />
            
            </figure><p>But HTML delivery is one thing, what's the real end-user visible effect? i.e. how does this translate to a difference in page load time.</p>
    <div>
      <h3>Page Load Time</h3>
      <a href="#page-load-time">
        
      </a>
    </div>
    <p>Railgun makes a difference to page load time because it accelerates the download of the initial HTML which has to occur before the rest of the page downloads. Downloading the HTML faster helps the entire page download more quickly. Here's an example of the effect of Railgun on <a href="https://www.cloudflare.com/plans">CloudFlare's Plans page</a>. This small test was done from the same machine in London as all the other tests. First here's the waterfall for that page without Railgun enabled.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3k6Dw7GEhdhSycyruHRDVk/6b554bd3d2daa916d360a82a5fd1ef0e/Screen_Shot_2012-12-20_at_2.17.18_PM.png.scaled500.png" />
            
            </figure><p>The page load time was 1.83s. Now with Railgun enabled the page load time dropped to 1.15s because the time to download the initial HTML dropped.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/HCJCFM1TJgM56tNXctx1s/e997ed15376b6a1a3b743d5244e59b4c/Screen_Shot_2012-12-20_at_2.17.53_PM.png.scaled500.png" />
            
            </figure><p>Of course, that's just one test. Repeating the test 10 times with and without Railgun saw a median page load time of 1.59s with Railgun and 2.59s without (making the Railgun accelerated time 61% of the non-accelerated page load time). A similar test with CloudFlare's home page showed a median Railgun-accelerated page load time of 2.56s and without Railgun of 3.2s (i.e. Railgun makes the page load time drop to 83% of what it was).</p><p>To measure page load time on the 51 sites supplied by Vexxhost we set up <a href="http://phantomjs.org">PhantomJS</a> (a headless browser that uses the WebKit for engine) on the same machine as used for the measurements above. A small script enabled us to generate HAR files of the download of entire web pages (including the JavaScript, CSS, HTML and images) and to extract the page load time (we use the 'onload' time).</p><p>These page load times include assets that are not accelerated by CloudFlare or by Railgun so they show realistic figures of how Railgun helps. Nevertheless, Railgun helps across the sites picked by Vexxhost with a median decrease in page load time to 89% of the original time. The best increase in median page load time was 56%. A small number of sites didn't see an improvement in page load time (they correspond to sites that didn't get a significant Railgun speedup because they typically only had a small amount of HTML).</p><p>A comparison of the same site downloaded via Railgun and not can be seen in these two images. The decrease in page load time is due to the decrease in time to get the initial HTML. Here's the page loading without Railgun:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7w4NDY7JoN3cWm0ZG6dcAE/bd02063a0b68b8de7b4c7432a6b45993/Screen_Shot_2012-12-21_at_10.31.15_AM.png.scaled500.png" />
            
            </figure><p>And with Railgun the intial HTML load is accelerated resulting in a faster overall load time.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4bbkZfYgfvsoONBUafyb0M/4e9c59d8b560340916ba8a995c30f555/Screen_Shot_2012-12-21_at_10.31.20_AM.png.scaled500.png" />
            
            </figure><p>The difficulty with measuring page load time to see the Railgun-related improvement is that page load time is highly variable as different assets (especially from sites that are not accelerated by a CDN like CloudFlare) cause the page load time to vary enormously. To get a picture of the expected page load time improvement we can move on from measurement to estimation to check that measurements are similar the expected improvement.</p>
    <div>
      <h3>Estimating the Railgun Improvement</h3>
      <a href="#estimating-the-railgun-improvement">
        
      </a>
    </div>
    <p>One obvious question is to ask how much improvement Railgun can bring to a web site. To work that out you need to know two numbers: the page load time (call it p) and the time to download the initial HTML (call that h). Both values can be obtained from the Developer view in Safari or Chrome or from Firebug.</p><p>Railgun will be able to decrease time h. Using the figures above the median improvement would be 70% so you'd expect a page that takes p seconds to load to take roughly p - 0.3 * h with Railgun. In the CloudFlare example above p was 1.83s and h was 0.949s. The formula would give a Railgun page load time of 1.83 - 0.3 * 0.949 = 1.55s (the actual value 1.15s because Railgun did better than the median for that particular page).</p><p>In general, the larger the initial HTML the more Railgun can help. Very small pages won't require many round trips between the origin server and Railgun edge server, but larger pages will benefit from the delta compression. And Railgun helps when the web browser and origin server are far apart (for example, when a web site is accessed from around the world, Railgun will help eliminate the round trip time between a web surfer in one country and a web server in another).</p><p>To double check the measured performance above we ran a prediction for the sites that Vexxhost gave us. To predict the speedup generated by Railgun we first loaded each page 20 times using PhantomJS and extracted the median page load time (p) and the median time to download the initial HTML (h).</p><p>Then using the measured median speedup in the initial HTML load (see the first section above) we predicted that change in page load time by accelerating the initial HTML load and leaving all the other asset load times fixed.</p><p>The prediction showed that the median page would load in 93% of the non-Railgun-accelerated time. The measured times were 89%. As with the prediction for the speedup of a CloudFlare page, the measured times are better than the crude predictor, but both show the importance of accelerating the initial HTML load.</p>
    <div>
      <h3>Conclusion</h3>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>In real world tests Railgun gives a median decrease in the page load time to 89% of the non-accelerated time. That translates directly into an improved experience for the end user, and because Railgun runs everywhere in the CloudFlare network it means that page load times are improved for users wherever they are in the world.</p><p>Of course, none of this means that web page authors can be complacent about page load time. CloudFlare provides <a href="https://www.cloudflare.com/features-optimizer">many tools to accelerate web page delivery</a> and web page authors need to be mindful of slow assets and use tools like <a href="http://developer.yahoo.com/yslow/">YSlow</a> to make web page as fast as possible. They need to be particularly mindful of slow third-party assets (such as JavaScript libraries or Like and Share buttons loaded from other domains) as these directly affect page load time.</p><p>In fact, the greatest benefit from Railgun comes for sites that have already optimized page load time. Railgun will help drastically reduce the time taken for the already optimized page to reach our edge servers and be sent on to end users. In contrast, a page that has not been optimized may rely on tens of slow or third-party assets that must be downloaded for the page to be ready masking the effects of Railgun.</p><p>In a future post I'll look at Railgun performance when accelerating RESTful APIs. And I'll look at the effect of Railgun on subsequent page loads where static assets will be in local cache: in that case Railgun acceleration will be even more noticeable as the HTML download time will be a greater proportion of the total page load time.</p> ]]></content:encoded>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Railgun]]></category>
            <category><![CDATA[Speed]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">54tCyUNqsfxkTWET3J3d1M</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[CloudFlare Heads to HostingCon 2012]]></title>
            <link>https://blog.cloudflare.com/cloudflare-heads-to-hostingcon-2012/</link>
            <pubDate>Fri, 13 Jul 2012 16:26:00 GMT</pubDate>
            <description><![CDATA[ CloudFlare is going to be at HostingCon 2012 in Boston from Sunday, July 15th to Wednesday, July 18th. We are excited to see our current partners and meet potential new partners at the show! Our team is looking forward to an extremely busy conference. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>CloudFlare is going to be at <a href="http://www.hostingcon.com/">HostingCon 2012</a> in Boston from Sunday, July 15th to Wednesday, July 18th. We are excited to see our current partners and meet potential new partners at the show! Our team is looking forward to an extremely busy conference and we have several fun events planned, including complimentary limousine service between Boston Logan International Airport and the Boston Sheraton Hotel, a daily CloudFlare hosted breakfast, an exhibit booth and of course, attending all of the parties.</p><p>If you are already one of our certified hosting provider partners, be sure to stop by and introduce yourself. We will have CloudFlare t-shirts and some mystery goodies to celebrate the <a href="/cacheing-the-uncacheable-cloudflares-railgun-73454">launch of Railgun</a>. If you are not a partner yet, stop by to learn more about how CloudFlare can save you server and bandwidth resources, provide DDOS protection, IPv6 compatibility and much more.</p><p>Our schedule for the week is as follows:</p>
    <div>
      <h4>Sunday, July 15th</h4>
      <a href="#sunday-july-15th">
        
      </a>
    </div>
    <p>Limo transfers from Boston Logan International Airport to the Boston Sheraton Hotel.</p><p><i>Registration is now closed for the limos, however, if you send an email to </i><a href="#"><i>limos@cloudflare.com</i></a><i> with your flight number, airline and time of arrival, we will try to accommodate you.</i></p>
    <div>
      <h4>Monday, July 16th</h4>
      <a href="#monday-july-16th">
        
      </a>
    </div>
    <p><b>8am-10am:</b> CloudFlare sponsored breakfast in Room #312<b>11am-12pm:</b> Our co-founder and CEO Matthew Prince speaks on <a href="/cacheing-the-uncacheable-cloudflares-railgun-73454">Railgun</a> in the 3rd level meeting rooms<b>5pm onwards:</b> Come and find the CloudFlare team at the welcome reception!</p>
    <div>
      <h4>Tuesday, July 17th</h4>
      <a href="#tuesday-july-17th">
        
      </a>
    </div>
    <p><b>8am-10am:</b> CloudFlare sponsored breakfast in Room #312**11:30am onwards:**CloudFlare is in the Exhibit Hall at Booth #809.<b>1pm-6pm:</b> Conversations with CloudFlare - We will be conducting live video interviews with thought leaders within the hosting industry, including founders and executives.<b>3:30pm:</b> Our co-founder and CEO Matthew Prince will be speaking on the DDoS panel discussion _"Technology Strategies and Practices for Defending Against DDoS Attacks"_in the 3rd level meeting rooms</p>
    <div>
      <h4>Wednesday, July 18th</h4>
      <a href="#wednesday-july-18th">
        
      </a>
    </div>
    <p><b>8am-10am:</b> CloudFlare sponsored breakfast in Room #312<b>11:30am onwards:</b> CloudFlare is in the Exhibit Hall at Booth #809.</p><p>Connect with us on Twitter during the event to find out where we are and what's coming up next:</p><p><a href="https://twitter.com/search/%23HostingCon">#hostingcon</a>, <a href="https://twitter.com/hostingcon">@hostingcon</a>, <a href="https://twitter.com/CloudFlare">@CloudFlare</a></p><p>See you next week in Boston!</p> ]]></content:encoded>
            <category><![CDATA[Events]]></category>
            <category><![CDATA[Hosting Con]]></category>
            <category><![CDATA[Railgun]]></category>
            <guid isPermaLink="false">6TehlT0f3oQs5RgBuJuKsL</guid>
            <dc:creator>Kristin Tarr</dc:creator>
        </item>
        <item>
            <title><![CDATA[Go at CloudFlare]]></title>
            <link>https://blog.cloudflare.com/go-at-cloudflare/</link>
            <pubDate>Tue, 03 Jul 2012 15:21:00 GMT</pubDate>
            <description><![CDATA[ The other day I blogged here about our new Railgun software that speeds up the back haul between CloudFlare data centers and our clients' servers. At CloudFlare we're using a number of different languages depending on the task. ]]></description>
            <content:encoded><![CDATA[ <p>The other day I blogged here about our new <a href="/cacheing-the-uncacheable-cloudflares-railgun-73454">Railgun software</a> that speeds up the back haul between CloudFlare data centers and our clients' servers. At CloudFlare we're using a number of different languages depending on the task: C or C++ for all core services, PHP for the main web site, Lua for customization of nginx and an extensive amount of JavaScript. Railgun is slightly different as it's about 4,000 lines of <a href="http://golang.org/">Go</a> of which about 3,000 are code (not comments).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2GFj8nrjVz8J9lK5nLKq8L/c1c53ea3f6165974dea90c5e80e02da9/1320968710.jpeg.scaled500.jpg" />
            
            </figure><p>Image source: <a href="http://stanleylieber.com/">stanleylieber.com</a>; created by <a href="http://reneefrench.blogspot.co.uk/">Renée French</a></p><p>We chose to use Go for Railgun because Railgun is inherently highly concurrent. A single instance of the Railgun client should be able to handle large numbers of requests from the CloudFlare data center for content and then multiplex them across an Internet connection to be handled. Go's concurrency makes writing software that must scale up and down very easy.</p><p>Railgun makes extensive use of goroutines and channels. Goroutines handle both the multiplexed Internet connections (of which there could be many between a single CloudFlare data center and our clients) and the connections needed to get content from origin web servers and provide the content back to the nginx server that sends it on to the web browser.</p><p>Probably the nicest thing about goroutines and channels is that they make it easy to create 'fire and forget until needed' systems. You create a channel, create a goroutine that communicates on that channel and then read from the channel when needed (perhaps using a <a href="http://golang.org/ref/spec#Select_statements">select</a> statement).</p><p>(Aside: for those who studied computer science, Go owes a lot to Hoare's <a href="http://en.wikipedia.org/wiki/Communicating_sequential_processes">CSP</a> and Dijkstra's <a href="http://en.wikipedia.org/wiki/Guarded_commands">Guarded Commands</a>.</p><p>A small example of a goroutine inside Railgun is this unique ID generator. It generates a sequence of IDs that are used to identify streams (a stream contains a single HTTP request) being sent between the CloudFlare data center and a client site.</p><p>It works by adding data to a SHA1 hash and each time a read is made on the channel id a new string ID is created by hashing the data. The whole thing is running as an independent goroutine that only does work when needed. (You can play with this code live <a href="http://play.golang.org/p/srlnFu9Idn">here</a>).</p><p>Another powerful aspect of Go is the way in which it handles object orientation. Go has a notion of an interface which is used to identify a capability of an object and where it can be used. One common interface is <a href="http://golang.org/pkg/io/#Writer">io.Writer</a>. To be an io.Writer an object has to implement the Write function which has the signature Write(p []byte) (n int, err error). Any object that implements that can be used wherever an io.Writer is needed.</p><p>In Railgun there's a simple object called a Counter that is an io.Writer. It turns an ordinary io.Writer into one that writes, but also counts how much it's written. When its Write is called it keeps track of the number of bytes and calls the underlying io.Writer. It looks like this:</p><p>As an example of its use, here's how the unique ID generator above can be altered to count the number of bytes of data that have been written to the SHA1 hash. Since h implements io.Writer it can be passed to counter.New and it can be used to write data to the hash and keep a count. Reading from the count channel would retrieve how many bytes had been written. (See the <a href="http://play.golang.org/p/yZ8C0Tmpsf">live version</a> for an example).</p><p>Part of the reason Railgun is so small is that Go's library is extensive and easy to work with. Go has libraries for <a href="http://golang.org/pkg/net/http/">HTTP</a>, <a href="http://golang.org/pkg/net/">raw network connections</a>, <a href="http://golang.org/pkg/net/url/">URL manipulation</a>, <a href="http://golang.org/pkg/crypto/tls/">TLS</a>, many different types of <a href="http://golang.org/pkg/encoding/">serialization</a> systems, <a href="http://golang.org/pkg/crypto/">cryptographic hashing</a>, <a href="http://golang.org/pkg/compress/">compression</a>, and the more mundane <a href="http://golang.org/pkg/strings/">string manipulation</a>, <a href="http://golang.org/pkg/time/">date/time</a>, and <a href="http://golang.org/pkg/log/">logging</a>.</p><p>Another reason Go has been helpful is that is generates a single executable that can be distributed to our clients. There's no complex dependency chain or layout of shared libraries to worry about.</p> ]]></content:encoded>
            <category><![CDATA[Go]]></category>
            <category><![CDATA[Railgun]]></category>
            <category><![CDATA[JavaScript]]></category>
            <category><![CDATA[Deep Dive]]></category>
            <category><![CDATA[Programming]]></category>
            <guid isPermaLink="false">1domM3li0fD55RdFuD5Q8R</guid>
            <dc:creator>John Graham-Cumming</dc:creator>
        </item>
        <item>
            <title><![CDATA[Making Edge Side Includes (ESI) Automatic and Easy]]></title>
            <link>https://blog.cloudflare.com/making-edge-side-includes-esi-automatic-and-e/</link>
            <pubDate>Tue, 03 Jul 2012 07:00:00 GMT</pubDate>
            <description><![CDATA[ On HTTP, caching is done at the file level. A browser will cache the JPEG, CSS, and Javascript files on a page. However, the HTML of most pages is dynamically generated. As a result, the pages cannot be cached.  ]]></description>
            <content:encoded><![CDATA[ <p></p><p>On HTTP, caching is done at the file level. A browser will cache the JPEG, CSS, and Javascript files on a page. However, the HTML of most pages is dynamically generated. As a result, the pages cannot be cached. This is unfortunate because the HTML of even highly dynamic pages rarely changes more than 10%. The 90% of the HTML that is the same from one request to the next is transmitted needlessly.</p><p>On the web, compression equals performance. If you can compress a response by 50% you will, roughly, double network performance. Given that 90%+ of HTML doesn't need to be transmitted over the network, if you could only transmit the actually dynamic parts of the content then you'd get a massive performance increase.</p>
    <div>
      <h3>Last Gen Solution: Edge Side Includes</h3>
      <a href="#last-gen-solution-edge-side-includes">
        
      </a>
    </div>
    <p>Recognizing this opportunity, traditional content delivery network (CDN) vendors created the Edge Side Include (ESI) protocol. The protocol was submitted as an official standard to the World Wide Web Consortium (W3C) but it was never accepted. A handful of other old school CDNs today support ESI, although it's adoption has been slow.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3l2jP3EYcRPTt2EdspvjC0/dd18ab715e56ad51c148071d371ca7d7/dinosaur.jpg.scaled500.jpg" />
            
            </figure><p>Here's how ESI works: when you create a web page you determine what parts are static and dynamic. You implement the static portions as a file that you upload to your CDN. Within that file you include tags that reference the dynamic portions of the content, with URL of where to fetch the dynamic portions from. The CDN fetches each of these dynamic resources and combines them with the static portion in order to render the HTML of the page before it sent across the network back to the browser.</p><p>If that sounds easy to implement then you likely haven't done much web development. To get a sense of the complexity, check out this 106 page <a href="http://www.akamai.com/dl/technical_publications/akamai_esi_developers_guide.pdf">ESI developer's guide</a>. While ESI can theoretically deliver significant performance benefits, the pain of actually developing for it is significant. And, once you've developed for it, there's significant process lock-in: good luck ever leaving. We think you shouldn't have to learn a new programming language or change a single line of your code just to make your site fast.</p><p>And if you're spending your time bending your HTML so that a CDN can serve it up better then you're not spending it on developing your actual web site.</p>
    <div>
      <h3>Next Gen: Faster, Easier, Better</h3>
      <a href="#next-gen-faster-easier-better">
        
      </a>
    </div>
    <p>Yesterday, we <a href="/cacheing-the-uncacheable-cloudflares-railgun-73454">posted about Railgun</a> and how it lets you cache what was previously uncacheable content. One way of thinking about Railgun is that it is like automatic ESI support without the work. Rather than you having to tag your own content to mark what is static and what is dynamic, Railgun automatically determines the static portions of HTML and caches that at the edge. Dynamic portions of HTML are always fetched from the origin without you needing to change a single line of code.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/CseZc6Qxj4aclITqFLskC/31312fd052d6e46487206d6345a4f15c/fast_dolphins.jpg.scaled500.jpg" />
            
            </figure><p>Moreover, the caching logic is responsive to what is actually happening on the page. If different elements on the page change at different rates then Railgun's cache will deliver them optimally, never wasting a byte that doesn't otherwise need to be transmitted. And, since you don't need to change how you write code in order to support Railgun, there's no process lock-in if you ever decide to turn the service off. While youwon't get the benefits of Railgun without CloudFlare, you won't need to completely rewrite your code. In fact, you won't need to change a thing.</p>
    <div>
      <h3>CloudFlare: We Fight for the Publishers</h3>
      <a href="#cloudflare-we-fight-for-the-publishers">
        
      </a>
    </div>
    <p>We talk to a lot of web publishers and the constant refrain we hear is that the performance and security tools that are available to them are too expensive and too complicated. We've had nearly half a million websites sign up for CloudFlare largely because we focused on these two issues. Railgun takes ESI, another technology that was previously reserved for only those sites with huge budgets and dedicated CDN management teams, and makes it available in a way that is affordable and easy to implement.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/485V0B71f7h1XG4YGv0EzU/28bf60b613d75f6a0e67285fecf00298/railgun.png.scaled500.png" />
            
            </figure><p>Because Railgun requires software to be installed on the origin server, we have limited its availability to our Business and Enterprise customers. However, our plan is to roll it out to CloudFlare's Free- and Pro-level customers if they are hosted on a CloudFlare Optimized Hosting Partner. If you're interested in Railgun, you can <a href="http://www.cloudflare.com/plans">upgrade to CloudFlare Business or Enterprise</a>. Alternatively, ping your hosting provider to know they should become a <a href="http://www.cloudflare.com/hosting-partners">CloudFlare Optimized Host</a>. It's free for hosts and, if they tell us you're the person who convinced them to sign up, we'll send you a T-shirt and make sure you're one of the first of the host's customers to get access to Railgun.</p> ]]></content:encoded>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Railgun]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Cache]]></category>
            <guid isPermaLink="false">4YeanBcCnjGaYKwlehamM8</guid>
            <dc:creator>Matthew Prince</dc:creator>
        </item>
        <item>
            <title><![CDATA[Caching the uncacheable: CloudFlare's Railgun]]></title>
            <link>https://blog.cloudflare.com/cacheing-the-uncacheable-cloudflares-railgun-73454/</link>
            <pubDate>Mon, 02 Jul 2012 05:44:00 GMT</pubDate>
            <description><![CDATA[ CloudFlare recently rolled out a premium service called Railgun that's available to CloudFlare Business and Enterprise customers. Railgun is web optimization software that's designed to speed up the delivery of content that cannot be cached. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>CloudFlare recently rolled out a premium service called <a href="https://www.cloudflare.com/railgun">Railgun</a> that's available to <a href="/introducing-cloudflare-business-and-cloudflar">CloudFlare Business and Enterprise</a> customers. Railgun is web optimization software that's designed to speed up the delivery of content that cannot be cached.</p><p>One of the major advantages of using CloudFlare is that cacheable content (such as images, JavaScript, CSS and HTML) is both cached by CloudFlare and delivered from our data centers around the world. Because CloudFlare has data centers covering the entire globe, cached content gets delivered quickly to web surfers wherever they are (and overcomes <a href="/the-bandwidth-of-a-boeing-747-and-its-impact">latency problems</a>).</p><p>But only about 66% of content is cacheable. The other 34% must be obtained from the real origin web server. Railgun overcomes this problem by using a scheme that is able to cache dynamically generated or personalized web pages dramatically reducing bandwidth used and improving download times.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/58sIn1lD2nycY0EbLOzWZS/ca41ed2f9ac31280cc099d27be6c5241/4638156870_e37df220f3_n.jpeg.scaled500.jpg" />
            
            </figure><p>Image credit: <a href="http://www.flickr.com/photos/davefayram/">Dave Fayram</a></p>
    <div>
      <h3>Caching the Uncachable</h3>
      <a href="#caching-the-uncachable">
        
      </a>
    </div>
    <p>Railgun works by recognizing that uncacheable web pages do not change very rapidly. For example, I captured the CNN homepage HTML once, and then again after 5 minutes and then again after one hour. The page sizes were 92,516, five minutes still 92,516 and one hour later 93,727.</p><p>CNN sets the caching on this page to 60 seconds. After one minute it's necessary to download the entire page again. But looking inside the page itself not much has changed. In fact, the change between versions is on order of 100s of bytes out of almost 100k. Here's a screenshot of one of the small binary differences between the CNN home page at five minute intervals. The yellow bytes have changed, the rest have not:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6Lsm1qwj1y3tuAPILBitDW/32c1f2f94f2357d518d6e507c60ceac7/Screen_Shot_2012-06-28_at_3.20.30_PM.png.scaled500.png" />
            
            </figure><p>Experiments at CloudFlare has revealed similar change values across the web. For example, reddit.com changes by about 2.15% over five minutes and 3.16% over an hour. The New York Times home page changes by about 0.6% over five minutes and 3% over an hour. BBC News changes by about 0.4% over five minutes and 2% over an hour.</p><p>Although the dynamic web is not cacheable, it's also not changing quickly. That means that from moment to moment there's only a small change between versions of a page. Railgun uses this fact to achieve very high rates of compression. This is very similar to how video compression looks for changes from frame to frame; Railgun looks for changes on a page from download to download.</p>
    <div>
      <h3>The Technical Details</h3>
      <a href="#the-technical-details">
        
      </a>
    </div>
    <p>Railgun consists of two components: the sender and the listener. The sender is installed at every CloudFlare data center around the world. The listener is a software component that premium customers install on their network.</p><p>The sender and listener establish a permanent TCP connection that's secured by TLS. This TCP connection is used for the Railgun protocol. It's an all binary multiplexing protocol that allows multiple HTTP requests to be run simultaneously and asynchronously across the link.</p><p>To a web client the Railgun system looks like a proxy server, but instead of being a server it's a wide-area link with special properties. One of those properties is that it performs compression on non-cacheable content by synchronizing page versions.</p><p>Each end of the Railgun link keeps track of the last version of a web page that's been requested. When a new request comes in for a page that Railgun has already seen, only the changes are sent across the link. The listener component make an HTTP request to the real, origin web server for the uncacheable page, makes a comparison with the stored version and sends across the differences.</p><p>The sender then reconstructs the page from its cache and the difference sent by the other side.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/11IonFLTllYtdoA6jfSDfB/d7e0a79d621db551c4b85321b0a5d95d/railgun-wan-details.png.scaled500.png" />
            
            </figure>
    <div>
      <h3>Blowing the Doors Off Standard Gzip</h3>
      <a href="#blowing-the-doors-off-standard-gzip">
        
      </a>
    </div>
    <p>Of course, compression is used on web pages today. The most common technique is to gzip the page itself. CNN actually does this and sends 23,529 bytes of gzipped data which when decompressed become 92,516 bytes of page (so the page is compressed to 25.25% of its original size). And Google has proposed a somewhat complex dictionary based scheme called <a href="http://en.wikipedia.org/wiki/Shared_Dictionary_Compression_Over_HTTP">SDCH</a> which is not widely deployed.</p><p>But the Railgun compression technique goes much further. The compression between versions 1 and 2 of the page above (at five minute intervals) results in just 266 bytes of difference data being sent (a compression to 0.29% of the original page size). The one hour difference (versions 2 to 3 above) is 2,885 bytes (a compression to 3% of the original page size). Clearly, Railgun compression outpeforms gzip enormously.</p><p>For pages that are frequently accessed the deltas are often so small that they fit inside a single TCP packet, and because the connection between the two parts of Railgun is kept active problems with <a href="/what-makes-spdy-speedy">TCP connection time and slow start</a> are eliminated.</p><p>Railgun means that for premium CloudFlare customers the entire web becomes (almost completely) cacheable. <a href="http://www.cloudflare.com/railgun">Learn more about Railgun</a> or <a href="http://www.cloudflare.com/plans">upgrade to a CloudFlare Business or Enterprise account</a> to enable it for you site.</p> ]]></content:encoded>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Railgun]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Cache]]></category>
            <guid isPermaLink="false">01bpVmdNPEqOPDTGZAjkXv</guid>
            <dc:creator>John Graham-Cumming</dc:creator>
        </item>
    </channel>
</rss>