CloudFlare's Railgun protocol gets buy-in from web giants
Byte-level caching cuts dynamic content loading times by 90 percent
Web hosters and cloud operators have charged up their infrastructure with CloudFlare's 'Railgun' WAN optimization technology, giving developers the 'net over an easy way to dramatically speed the loading of dynamic pages.
The wide-area network optimization technology makes it possible to cache content at the byte level within dynamic web pages, dramatically reducing the latency of loading dynamic pages and greatly increasing the responsiveness of sites and applications.
Over 30 web hosters have now installed Railgun software agents within their datacenters. The tie-in was announced by CloudFlare on Tuesday and further technical details were released on Wednesday.
Railgun cuts the time it takes to access data stored on websites by caching sub-components of a dynamic page down to the 5-byte level on edge servers operated by CloudFlare, speeding the rate at which the site is delivered to the user.
By example, a bank could use Railgun to give its website a compression ratio of 99.6 per cent, CloudFlare's chief executive Matthew Prince, told The Register via email.
"Your account page and my account page will be 99 per cent the same, only the information like the balance amount changes," he said. "Railgun allows us to cache the parts of the page that don't change at the edge of our network and only transmit the parts of the page that have changed from one request to another."
The tech has two components – a sender and a listener. The sender is installed in CloudFlare locations around the world, while the listener is installed on the network of the site being sped up.
The sender and listener connect via
two-cups-and-a-string a TCP connection secured by TLS. The Railgun binary multiplexing protocol allows multiple HTTP request to run simultaneously and asynchronously between the two.
When a request comes in for a page, the listener compares the current page with the last cached version and sends the differences to the sender, which reconstructs the page.
Large sites will need to give the Railgun protocol about the same resources as a high-performance web service, with a customer-side Railgun listener being able to effectively cache a site with tens of thousands of page views across hundreds of thousands of pages if given about a gig of RAM, Prince said.
Because Railgun works on differences, it can be handy for large dynamic sites. For example, mega-social-site Reddit changes by about 3.16 per cent every hour, so instituting Railgun there would dramatically reduce load on the site's network and lower access speeds for procrastinators.
Online filth hangout 4chan and all-purpose image repository Imgur are already using Railgun.
CDN king Akamai offers a dynamic caching service via its Akamai's Edge Side Include (ESI) protocol, but this requires developers to rewrite their pages with markups to tell ESI which bits are static and which are dynamic, whereas Railgun can be deployed without changing the page code.
CloudFlare has partnered with 30 of the world's largest web hosts to embed Railgun into sites, so these companies' customers will shortly be able to enable Railgun by clicking a single button in their control panels.
Developers on Amazon Web Services can also tap into the cloud CDN by mounting an Amazon Machine Image containing the Railgun listener onto an AWS instance that connects with their site.
The places where Railgun won't work generally involve dynamic content where 100 per cent of the response changes with every request.
"For example, if you had an API that just returned a random number, Railgun would not be able to cache any part of the response," Prince said. "However, we actually do get significant compression even on JSON or XML responses from APIs because even very dynamic responses end up having significant amount of repetitive, boilerplate content."
CloudFlare's current Railgun partners include 040hosting, A2 Hosting, Arvixe, Bluehost, ByetHost, CoreCommerce, DreamHost, ELServers, FastDomain, GreenGeeks, HostPapa, HostMonster, Just Host, InterServer, MapleTime, Media Temple, MDDHosting, NameCheap, PacificHost, PRO ISP, SiteGround, Sliqua Enterprise Hosting, Softcloud Hosting, SparkRed, VentraIP, VEXXHOST, WebHostingBuzz, WebHostingPad, x10Hosting, and Zuver.
If Railgun is adopted widely, web users across the world can expect some of their sites to load much more quickly, even over shoddy connections. Developers, meanwhile, can implement the protocol and care less about the size of their dynamic pages or, hopefully, work at slimming down their pages even more for lightning-speed delivery.
This will make it all the more galling if CloudFlare has a massive data center failure and all Railgun sites slow back to their previous speeds.
But then again, how likely is it that a global, distributed system could go down all at once? ®
Sponsored: Network DDoS protection