Cloudflare takes the serverless cloud fight to AWS, Google and Azure with two new features
Strongly consistent storage of state and scheduled jobs added to the Workers platform
Cloudflare, the distributed cloud and DNS firm best known for its DDoS mitigation services, is upgrading its Workers serverless platform to allow strongly consistent storage of state and scheduled jobs.
Cloudflare's Workers platform was launched in 2017, originally to serve an internal need for Cloudflare developers to build scalable apps compatible with the rest of the platform. Later the company extended Workers as a commercial offering.
In July, Cloudflare released Workers Unbound which allows developers to run workloads across the Cloudflare network and pay only for what they use. The company claims that this is up to 75 per cent cheaper than using the serverless platforms of the big cloud providers such as AWS Lambda, Google Cloud Functions and Microsoft Azure Functions.
Cloudflare says its platform solves the problem of cold starts (the delay caused when a function needs to spin up a new container) because the code runs on V8 Isolates rather than containers, and also offers mitigation for the Spectre flaw.
V8 Isolates, isolated instances of the Chrome V8 engine, also allow for multi-tenancy, enabling Cloudflare to run code from different customers within a single operating system process. Cloudflare claims that "as a result, there is almost no individual overhead and developers can run essentially limitless workloads. Innovation like this has the potential to disrupt the serverless market."
See also: What's happening with serverless cloud?
Two enhancements to Workers announced today are Cron Triggers, available immediately, and Durable Objects, launched as a private beta.
Cron Triggers allow developers to schedule scripts to run at regular intervals or fixed times rather than having them purely driven by events. They are run on underutilised machines in the network to make optimal use of capacity. Cron Triggers are available on both the Workers free tier and the paid tier, now called Workers Bundled, at no extra cost. An account may deploy any number of triggers, but there's a limit of three triggers per Worker script.
Meanwhile, Durable Objects is a strongly consistent storage and coordination platform with a serverless-first API in which persistent state can be maintained on disk. The platform already has eventually consistent edge storage the new development will make it possible to manage state with strong consistency, or to coordinate in real time between multiple clients, entirely on the edge. Currently, these parts of the application have to be hosted elsewhere.
"With unified infrastructure, Cloudflare Workers offers a serverless platform that has performance, speed, security, and scale baked in. The application code needed to serve one user looks the same as the code needed to serve a million users," said John Graham-Cumming, Cloudflare CTO.
"These two new features extend this vision by adding the use cases of scheduled jobs and strongly consistent distributed state. Both these features take advantage of Cloudflare's global network to deliver unique value to users. Cron Triggers intelligently schedule work on currently cold regions while Durable Objects make it easier than ever to develop against a large distributed system by offering strong consistency."