Compare Serverless Products

Estimates based on serverless:talent research team. Source: Product's Website

Topic
About Product

A "Cloudflare Worker" is JavaScript you write that runs on Cloudflare's edge. A "Cloudflare Service Worker" is specifically a worker which handles HTTP traffic and is written against the Service Worker API. Currently, this is the only kind of worker we've implemented, but in the future we may introduce other worker types for certain specialized tasks.

It can do anything and everything. You're writing code, so the possibilities are infinite. Your Service Worker will intercept all HTTP requests destined for your domain, and can return any valid HTTP response. Your worker can make outgoing HTTP requests to any server on the public internet.

AWS Lambda is a serverless compute service that runs your code in response to events and automatically manages the underlying compute resources for you. You can use AWS Lambda to extend other AWS services with custom logic, or create your own back end services that operate at AWS scale, performance, and security

You can use AWS Lambda to build mobile back-ends that retrieve and transform data from Amazon DynamoDB, handlers that compress or transform objects as they are uploaded to Amazon S3, auditing and reporting of API calls made to any Amazon Web Service, and server-less processing of streaming data using Amazon Kinesis. While execution environment reuse is useful, you should not depend on this for performance optimization. Lambda is a high availability service that manages execution across multiple Availability Zones in an AWS Region. Depending upon aggregate customer traffic, the service may load balance a function at any time.


Pricing

1. Free plan
The Workers Free plan makes it easy to experience the Workers ecosystem without a commitment. The Free plan provides access to Workers and Worker KV, giving you the tools to start building your service. Learn about the Free plan limits.

2. Paid plan
To avoid the Free plan limits, you can subscribe to the Workers Paid plan for a minimum $5 USD per month for an account.

Free Plan

The AWS Lambda free usage tier includes 1M free requests per month and 400,000 GB-seconds of compute time per month.

Paid Plans

Requests: $0.20 per 1M requests
Duration: $0.0000166667 for every GB-second
Data Transfer: Lambda@Edge request pricing is $0.60 per 1 million requests. (This is run functions on all the data center edges)

Example pricing:

AWS Lambda is very cheap, and 1 million invocations with the average time of 500ms and 128 MB of available memory distributed from edges would only cost approximately $1.79 USD

Performance

Cloudflare Workers respond very quickly, typically in under 200 milliseconds, when cold starting. In contrast, both Lambda and Lambda@Edge functions can take over a second to respond from a cold start. The differences are largely due to the fact that Cloudflare Workers run on Chrome V8 rather than Node.

Onboarding
AWS is famous for its detailed documentation, working code examples, videos, guides, tutorials and training plans. Onboarding will be easier and it will not take time be up and running. 

Scalability
AWS Lambda is designed to use replication and redundancy to provide high availability for both the service itself and for the Lambda functions it operates. There are no maintenance windows or scheduled downtimes for either. AWS Lambda is designed to run many instances of your functions in parallel. When you update a Lambda function, there will be a brief window of time, typically less than a minute, when requests could be served by either the old or the new version of your function.

Regions
The AWS global infrastructure is built around AWS Regions and Availability Zones. AWS Regions provide multiple physically separated and isolated Availability Zones, which are connected with low-latency, high-throughput, and highly redundant networking. With Availability Zones, you can design and operate applications and databases that automatically fail over between Availability Zones without interruption. Availability Zones are more highly available, fault tolerant, and scalable than traditional single or multiple data center infrastructures.

Security

Cloud security at AWS is the highest priority. As an AWS customer, you benefit from a data center and network architecture that is built to meet the requirements of the most security-sensitive organizations.

Technical Details

Cloudflare Workers are written in JavaScript, executed using the V8 JavaScript engine (from Google Chrome). It choosed JavaScript and V8 for two main reasons.

1. Security

The V8 JavaScript engine is arguably the most scrutinized code sandbox in the history of computing, and the Chrome security team is one of the best in the world. Moreover, Google pays massive bug bounties to anyone who can find a vulnerability. (That said, we have added additional layers of our own sandboxing on top of V8.)

2. Ubiquity

JavaScript is everywhere. Anyone building a web application already needs to know it: whereas their server could be written in a variety of languages, the client has to be JavaScript, because that's what browsers run.

Lambda runs your code on high-availability compute infrastructure and performs all the administration of the compute resources, including server and operating system maintenance, capacity provisioning and automatic scaling, code and security patch deployment, and code monitoring and logging. All you need to do is supply the code.

  • No servers to manage.
  • Continuous scaling
  • Cost optimized with millisecond metering
  • Consistent performance at any scale

AWS Lambda is a serverless compute service that lets you run your code without worrying about provisioning or managing any server.


Supported Languages
Javascript,Python,TypeScript
Javascript,Python,PHP,Java,Rust,TypeScript,Go,Ruby on Rails