GitHub, the easiest way for developers to write software together, has scaled into a collaboration of 5.8 million developers across more than 12 million repositories worldwide. GitHub worked with Fastly to customize their CDN set up, ensuring rapid and efficient delivery of their content. Fastly serves all static assets and sits in front of GitHub.com, Pages (their website hosting service), and raw.github.com.
“Fastly is impacting our end users in a very, very positive way. We’re able to find the places on our site where we can efficiently serve content through a CDN and aggressively move it over to Fastly in a very efficient manner. We trust that Fastly is going to serve things quickly and consistently across their global network.” Jesse Newland, Systems Engineer
GitHub began using Fastly to build a necessary new feature, and when their previous CDN provider experienced an outage, they moved much of their remaining content over to Fastly overnight. Because the Fastly service is truly self-provisioning and very quick to set up, GitHub was able to make the switch to Fastly and configure their service immediately - despite being in the midst of an attack and without having to engage a sales representative.
GitHub put Fastly in front of other services that were frequently subjected to DoS attacks. Using Fastly’s grace mode feature, they are able to limit the impact of an attack on end users by serving stale content from the cache instead of an error.
“We got through a capacity crunch, essentially, using Fastly’s infrastructure. The ability to really quickly get that content onto Fastly and cache it with just some quick configuration changes and origin set up was critical.”
Prior to Fastly, GitHub Pages experienced consistently high performance loads when request spikes overwhelmed origin servers. In order to smooth out spikes and manage the viral nature of Pages, Fastly gave GitHub a dedicated IP address in each datacenter, which allows the hundreds of thousands of custom domains created with Pages to pass through Fastly. This accelerates the individual Pages websites and minimizes the requests to origin, making Pages faster and more reliable. In fact, according to this comparison, Pages beats Arvixe, Windows Azure, and Amazon AWS in terms of site-loading time.
“We’re able to provide users with the ability to cname ‘yourblog.com’ through Pages at github.io and as long as that’s got content on the other side and it hits the right IP address that Fastly has configured, then it goes through the CDN, which is very nice for us. That’s often difficult with other CDNs.”
GitHub is also using Fastly to cache dynamic content, such as the raw rendered files from GitHub repositories. Before caching these files with Fastly, Raw.GitHub saw massive request spikes at constant intervals when thousands of machines requested user-generated content to perform automated actions. With Fastly in front of Raw, multiple requests for the same piece of content are collapsed to a single request, significantly reducing strain on origin.
“Before Fastly, our request graphs were very spikey: really high top of the hour spikes. We were previously seeing huge chunks of 100 requests at the top of the hour for one specific piece of content. With Fastly in front, we see one request at the top of the hour for that chunk of content. It very much smooths out those spikes for us.”
For GitHub, Fastly has become a critical partner. GitHub has experienced rapid growth in recent years, and they relied on Fastly to help scale their services as they re-architected key components of their infrastructure. Using Fastly has allowed GitHub to focus capacity planning on their main site while continuing to support other popular services, such as Raw and Pages, without sacrificing performance.
“I would recommend that people use Fastly. GitHub actually plans Fastly and its CDN services into our development and product roadmap. Fastly is a huge part of our toolkit for writing high performance, high scale web apps.”