Cloudflare recently announced Cloudflare Workers Unbound, its new serverless platform which it claims to provide "developers with unparalleled flexibility, performance, security, [and] ease of use" as well as saving " up to 75% for the same workloads running on legacy, centralised serverless platforms such as AWS Lambda."
Serverless is a better way of scaling, Cloudflare CTO John Graham-Cumming told iTWire. As it avoids the need to think about server architecture, "it takes away a headache for developers."
Other advantages are that it allows developers to debug code in the environment it will run once in production, provides more rapid access, reduces latency for end-users, and is in line with the move to increasingly lightweight ways of packaging applications.
And it quickly scales up or down as required, answering the developer's plea "I just want my code when it is time for my code to run."
With more traditional architectures, code either ran on the server or on the user's device. The former meant the code could easily be changed, but execution was high latency. The latter has the opposite characteristics: it is harder to change the code because that could require user interaction, but it ran with low latency. There's also a security issue, since it can be possible for a user to modify the code.
Serverless combines the best of both. Code runs on the provider's platform but relatively close to the user so the latency is low. But it can be updated easily, and there is no risk of modification by the user.
Legacy cloud applications are moving towards serverless, and will go from the current three-tier architecture (legacy cloud, serverless, device) to simpler two-tier arrangements, he said.
But he's not suggesting all applications are suited to serverless environments. For example, you wouldn't use serverless for a large machine learning program that required a huge amount of compute resources, or for an entrenched legacy application that uses a huge Oracle database. And there are good reasons for keeping user identity services in traditional cloud environments.
But "most things can be done in a serverless platform today," he said.
Having decided to go serverless, the next question is which serverless platform to use.
Graham-Cumming obviously has an axe to grind, but suggests the following questions:
Is the particular platform actually widely available, not just in beta?
Does it have a healthy ecosystem?
Does it support the languages you might want to use?
Does it have the geographical spread needed to provide all your users with low latency?
Is scaling an automatic function or a manual task?
Is DDoS mitigation and bot protection included?
Does it provide a mechanism to accelerate cold starts, or do you need to generate synthetic requests to keep your code in memory?
Is there a free tier so your developers can experiment with the service and its toolset?
Are good documentation and training materials provided?
Does it integrate with your existing CI/CD pipeline?
Does your development code run as if it were live, or in some sort of "fake" environment?
In Australia, Cloudflare Workers Unbound runs in seven of the company's points of presence, including Melbourne, Perth and Brisbane, Cloudflare ANZ head Raymond Maisano said, pointing out that well-known graphics SaaS provider Canva uses Cloudflare's serverless platform.