Serverless Performance: Cloudflare Workers, Lambda and Lambda@Edge

Serverless Performance: Cloudflare Workers, Lambda and Lambda@Edge

  • July 3, 2018
Table of Contents

Serverless Performance: Cloudflare Workers, Lambda and Lambda@Edge

A few months ago we released a new way for people to run serverless Javascript called Cloudflare Workers. We believe Workers is the fastest way to execute serverless functions, but lets prove it. At the 95th percentile, Workers is 441% faster than a Lambda function, and 192% faster than Lambda@Edge.

The functions being tested simply return the current time. All three scripts are available on Github. The testing is being done by a service called Catchpoint which has hundreds of testing locations around the world.

To be fair, comparing my Lambda, which only runs in us-east-1 (Northern Virginia, USA), to a global service like Workers is a a little unfair. This effect becomes even more clear if I only show tests ran in Australia. Sydney is 9,735 miles (53 light-ms) from our instance in us-east-1.

It becomes pretty clear how miserable the experience would be for visitors down south: As we only run one instance of each test from Australia every five minutes that’s not a conclusive amount of data though, so let’s look at the percentile distribution for the past 24 hours: The 50th percentile speed for Workers is 13ms, well faster than a packet could even get half way to Virginia. At the 95th percentile you’re looking at 882ms for Lambda, 216ms for Lambda@Edge, and 40ms for Workers.

A full 5% of your users will be waiting almost a second for the simplest possible Lambda response, making it impossible to build a responsive application. As we said, Workers has quite the advantage being deployed everywhere, as compared to Lambda which lives in a single region. (Lambda@Edge has less of an excuse).

We believe Worker performance should be great everywhere though, so lets look a little closer to our Lambda instance. First all the tests in North America:

Source: cloudflare.com

Share :
comments powered by Disqus

Related Posts

Showdown: MySQL 8 vs. PostgreSQL 10

Showdown: MySQL 8 vs. PostgreSQL 10

Now that MySQL 8 and PostgreSQL 10 are out, it’s a good time to revisit how the two major open source relational databases compete against each other. Before these versions, the general perception has been that while Postgres is superior in feature sets and its pedigree, MySQL is more battle tested at scale with massive concurrent reads/writes. But with the latest releases, the gap between the two has gotten significantly narrowed.

Read More
Kubernetes Containerd Integration Goes GA

Kubernetes Containerd Integration Goes GA

Containerd 1.1 works with Kubernetes 1.10 and above, and supports all Kubernetes features. The test coverage of containerd integration on Google Cloud Platform in Kubernetes test infrastructure is now equivalent to the Docker integration (See: test dashboard). We’re very glad to see containerd rapidly grow to this big milestone.

Read More
Introducing kepler.gl, Uber’s Open Source Geospatial Toolbox

Introducing kepler.gl, Uber’s Open Source Geospatial Toolbox

Created by Uber’s Visualization team, kepler.gl is an open source data agnostic, high-performance web-based application for large-scale geospatial visualizations. At Uber, we leverage data visualization to better understand how our cities move. Our solutions enable us to embed maps with rich location data, render millions of GPS points in the blink of an eye, and, most importantly, derive insights from them.

Read More