At the end of November, Fastly announced the launch of Fastly Labs, “a hub of in-progress projects and experimental ideas we’re opening up to the developer community at large”, and shared three new projects with the community: Terrarium (a multi-language browser-based editor and deployment platform), Fastly Fiddle (a place for developers to experiment with ideas on the Fastly platform without affecting service) and Fastly Insights (an optional RUM service for performance and network monitoring and research purposes).
Fastly Positioning at the Edge
Fastly is one of several of the big CDNs rebranding itself lately as an edge compute platform as opposed to calling itself a CDN. As edge computing becomes an increasingly important part of compute strategy and deployment, companies are rushing to position themselves as early pioneers in the field.
Fastly has more right than most to do so. The company was only founded in 2011 and initially focused its efforts on delivery of dynamic content to users faster. Helping news agencies, for instance, with the need to automatically update their landing page by pushing an instant purge and reloading the page from cache, then properly delivering it to readers. To do so, the company had to write application logic at the edge. It has won a broad range of clients from The New York Times to GitHub.
When Fastly repositioned itself as a CDN in 2015, widening its services, it received a huge influx of cash to do so in a $75M Series D round led by ICONIQ Capital and Google also came on board as a partner. In 2017, the company rebranded itself again, this time launching itself as an edge cloud platform and announcing various new services, including load balancing, a web application firewall and image optimization.
Momentum has been behind the San Francisco HQ’ed company from the get go. As we’ve discussed before, Artur Bergman as CEO has led the rapid scaling of Fastly into one of the world’s largest edge compute platforms, today serving over 10% of all Internet requests (around 400 billion daily). Over the last three years, its customer base has tripled and in a Series F round in July 2018, the company brought in a haul of $40M, intending to further expand its edge cloud services.
In the announcement for Fastly Labs, CTO Tyler McMullen (part of the founding team at Fastly) described how he and Bergman discussed “where the technology was headed” from the start and “the idea of an edge compute network – strategically moving our data and applications as close to the end user as possible”. McMullen says that for Fastly, “edge compute technology formed our backbone from the beginning – even if we weren’t fully aware of all its implications – and that’s exactly the direction we’re continuing to move in”.
Fastly Labs is the release of a collection of new projects developed internally at Fastly, which offers any interested user “the space to interact with new projects at the edge and experiment with next-generation products and experiences”. The branding around the release positions it as fitting in with “the spirit of trust and transparency with our community which are so integral to our values”. Indeed the project website describes the project as an opportunity to “join” the company “in laying the foundation of an edge ecosystem”.
Fastly Lab projects include research and development from its early stages to allow users to leverage the projects themselves, share feedback and “get a direct look into how we’re innovating and where we’re headed”. None of the projects allow users to actually touch the Fastly network so that they can continue to be safely developed and Fastly users aren’t impacted by the explorations and experimentations going on.
McMullen describes the initiative as “something special for our internal teams: the space to let creative ideas flourish, and for our developers to experiment freely and securely”. Similar things are happening over at VDMS, Cloudflare and others.
Three projects were launched as part of Fastly Labs:
Terrarium, which lets developers experiment with Fastly’s technology through playing with code – either by writing their own to create functions and applications, or exploring a pre-made example and quickly seeing it deployed over HTTPS. We’ll look at this project in more depth below.
Fastly Fiddle, which enables the developer community to try out ideas on the Fastly platform, run requests and explore what’s going on inside the Fastly network without impacting production service. Varnish Configuration Language (VCL) can be used to debug issues, try out custom code, instantly get results without the hassle of setting up servers. Fastly promises that Fiddle “lets you tap into the power, flexibility and speed of Fastly”.
As VCL code is typed, it automatically saves and syncs to the edge cloud as it is being typed. This enables you to deploy “a complete CDN service configuration to production every time you pause for breath”. Use cases that can be tested vary from rewriting URL paths to searching and replacing strings to image optimization, among others.
Fastly Insights, meanwhile, is a service that Fastly customers can choose to opt into to help the company “make the Internet work better” and improve network performance at scale. Fastly gathers information about HTTP and HTTPS network transactions such as performance timing, characteristics around equipment and networking routing data. This is sent to the Fastly Insights service and log streamed to a data warehouse for analysis. The data gathered is statistical in nature and doesn’t include personally identifiable data to maintain security and privacy for its customers and their end users.
Fastly also cites Insights as a means of demonstrating its potential to build “sophisticated applications, almost entirely at the edge”.
Terrarium Edge Compute Platform
The centerpiece of Fastly Labs is Terrarium. It is essentially a tech demo, which allows any interested party to write code in a range of languages and deploy them safely and quickly. It showcases the work of Fastly’s internal teams in developing a high-performance WebAssembly compiler and runtime.
The journey toward building faster WebAssembly runtimes began with the dawning realization within Fastly that existing sandboxes and isolates were heavier and slower to get going than they should be. This is because they are trying to isolate code, which wasn’t intended to be isolated. Typical compilers will take high level code and turn it into machine code, but the resulting machine code has little to guarantee its behavior. The sandbox then assumes the code may try and access anything at all about the environment, which means it needs to provide a vast environment for that code, which mimics the facilities offered by a typical OS.
Fastly said they realized that “if you can make the compiler and the sandbox work together, rather than at odds with each other, this problems gets significantly easier”. In the past, this wouldn’t have been tenable because you would have had to develop a new compiler for each language you wanted to support.
Fastly found use in WebAssembly primarily because “the semantics of its operations make sandboxing the code compiled with it much easier than it would be otherwise”. Concepts such as memory limits, memory bounds-checking, and control flow integrity are also baked into it from the start.
Fastly found challenges with the emerging Web Assembly ecosystem, including not fully evolved backends, rough tooling and fluid API standards. It sought to address these challenges with Terrarium by taking “the three languages with the best current support and do all the work of configuring the compilers, wire up the APIs, create a compilation pipeline, and finally, build an HTTP-based deployment platform for you”. As there is no need for specific languages, APIs or add-ons, testing and experimentation is made easier and there is no vendor lock-in, providing more flexibility for DevOps.
The company urges you to “give Terrarium a go for yourself, tinker around, and tell us what you are most curious about as we move forward”.