What is serverless computing and which enterprises are adopting it?

Serverless computing is an architecture where code execution is fully managed by a cloud provider, instead of the traditional method of developing applications and deploying them on servers.

It means developers don't have to worry about managing, provisioning and maintaining servers when deploying code. Previously a developer would have to define how much storage and database capacity would be needed pre-deployment, slowing the whole process down.

What are functions?

Serverless relies on functions, or more specifically functions-as-a-service, where developers break down their applications into small, stateless chunks, meaning they can execute without any context regarding the underlying server.

One of the most popular function-as-a-service offerings is AWS Lambda from the market leading cloud vendor Amazon Web Services (AWS). Launched all the way back in 2014, Lambda allows developers to do just this: run code without provisioning or managing servers. AWS charges you for the compute power you use according to 100 millisecond increments. Developers can therefore focus on their code and event triggers and AWS takes care of the rest.

Events could include changes to data in an Amazon S3 bucket or an Amazon DynamoDB table; in response to HTTP requests using Amazon API Gateway; or using API calls made using AWS SDKs. For example, when a user requests a car on a ride sharing app this could trigger the code which is written to fetch a car, or clicking the 'buy' button on an app will trigger that buying process.

Advertisement

"Lambda is an event-driven execution environment," explains Ian Massingham, chief evangelist at AWS. "So in very simple terms you have code and events, when the event arrives the code is executed for you automatically. So you don't have to pre-position resources or have any standing infrastructure to provide the execution environment."

He adds that when the event is triggered, a piece of infrastructure is allocated dynamically to execute the code: "What happens under the covers is a Linux container is started on a machine and details - metadata about the event - is passed into the container at the point of execution."

This is opposed to even the 'traditional' deployment model within AWS itself, where "EC2 [Elastic Compute Cloud] instances run web or app servers that wait around for requests and when they come they service them. That gives you floor costs, with Lambda your cost of execution with no traffic is zero and as you start to get traffic you scale up. It is way more cost effective at low levels of usage and way more scalable at high levels of usage, so benefits at both ends of the scale."

Massingham says that it is important to note that Lambda doesn't automatically equate to serverless however. "Lambda is the execution part and serverless is a little bit bigger," he says. "Beyond compute you also want to run things like your data stores in a way which doesn't require you to operate infrastructure, a way to do identity management that doesn't require you to operate infrastructure."

Amazon CTO Werner Vogels Vogels used an old favourite metaphor during his 2016 keynote: "Before, your servers were like pets. If they became ill you had to nurture them back to health. Then with cloud they were cattle, you put them out to pasture and got yourself a new one. In serverless there is no cattle, only your application. You don't even have to think about nurturing back to health or getting new ones, all the execution is taken care of."

Other serverless options

Serverless isn't just available to AWS customers though. IBM OpenWhisk is an alternative event-based architecture. Google has Cloud Functions for "developers to create single-purpose, stand-alone functions that respond to cloud events without the need to manage a server or runtime environment". Similarly Microsoft has Azure Functions.

Then, at Google Cloud Next in April 2019, Google Cloud committed further to serverless computing with the announcement of the public beta availability of Cloud Run, a fully managed environment for customers to deploy applications in a 'serverless' way.

In a blog post published at the time, Eyal Manor, VP of engineering and Oren Teich, product management director at Google Cloud said: "Traditional serverless offerings come with challenges such as constrained runtime support and vendor lock-in. Developers are often faced with a hard decision: choose between the ease and velocity that comes with serverless or the flexibility and portability that comes with containers. At Google Cloud, we think you should have the best of both worlds."

Previously Google customers could effectively run serverless using Google Cloud Functions, but with Run customers can "run stateless HTTP-driven containers, without worrying about the infrastructure," according to the blog post. Customers are then charged per 100 milliseconds of usage, for 'true' pay as you go billing.

Read next: Google Cloud launches fully managed serverless product Cloud Run

Cloud Run essentially spins up a Docker container on request, meaning developers can write and submit their code to the Cloud Run environment and GCP will take care of provisioning, configuring and managing servers, as well as auto-scaling to ensure customers genuinely pay for what they use.

"There's all kinds of proprietary pieces of caching and performance enhancements we are able to do," Teich said, "so Cloud Run manages to take advantage of the very best of everything we have built over the last 10 years to give this level of scale and flexibility without, really, any compromises."

Cloud Run is also being rolled out to work in tandem with the Google Kubernetes Engine (GKE), meaning customers "can run serverless workloads on your existing GKE clusters". The blog post explains: "You can deploy the same stateless HTTP services to your own GKE cluster and simultaneously abstract away complex Kubernetes concepts."

Oracle announced its own serverless solution at KubeCon 2018 called Oracle Functions, which is based on the open source serverless Fn project. This means that customers have the choice to deploy their functions to whatever cloud platform they choose, although the vendor will hope you pick Oracle Cloud Infrastructure.

In his blog post on Fn project, Johan Vos, co-founder of Gluon and LodgON, writes: "One of the key characteristics of Fn is that, although it is intended to run in cloud environments, it is not tied to a specific cloud vendor. The platform itself can be hosted on any cloud environment that supports Docker. That means you can run it on Oracle Cloud, but you can also run it on your own infrastructure or on other cloud systems, for example, Amazon Web Services (AWS), Google Cloud Platform, Microsoft Azure, and so on."

Oracle then took nearly two years to make its own Oracle Functions and Events on Oracle Cloud Infrastructure technology generally available. This solution promises a fully managed serverless platform for Oracle Cloud customers based on the Fn Project. This announcement was paired with the release of a managed event-routing service called Oracle Cloud Infrastructure Events, which is also based on an open source standard, namely the Cloud Native Computing Foundation's (CNCF) open CloudEvents standard.

Bob Quillin, vice president for developer relations at Oracle wrote in a August 2019 blog post: "Oracle Functions and Events work together to enable developers to compose applications from one or more serverless functions, which in turn are triggered by a range of cloud events, such as storage uploads, database updates, log triggers, and task completions."

Serverless momentum

Speaking on stage for his 2018 re:Invent keynote in November, Amazon CTO Werner Vogels talked about the trajectory of serverless computing, particularly with enterprises.

"We normally expect younger, tech-oriented businesses as the first ones to try this out, but what we are actually seeing is large enterprises are the ones that are really embracing serverless technology," he said. "The whole notion of only having to build business logic and not think about anything else really drives the evolution of serverless."

Vogels was joined on stage by guitar maker Fender, which has certainly swallowed the serverless message whole, using Lambda triggers to underpin its digital content pipelines and talking up its ambition to free up its developers to focus on its digital products and not infrastructure.

"Even traditional organisations, like Fender, are all going serverless," Vogels said. "The advantages are obvious, there is nothing to provision, it scales automatically, it's highly available and secure, and most importantly you only have to pay for what you use."

Going into more detail, Holly Mesrobian, director of engineering for AWS Lambda said: "Today we talk a lot about scalability, reliability, performance, security and cost. As we build out AWS Lambda we optimise for all of that in a serverless way."

Of those enhancements the one that got developers excited during re:Invent 2018 was the open source release of Firecracker, which allows for secure serverless development that doesn't cut back on performance. "We don't want our customers to make hard decisions between security and functionality," Mesrobian said.

Expanding on how it works, she said: "Firecracker provides secure and fast microVMs for serverless computing... To enable security from the ground up, it is built with speed by design, initiating code in less than 125 milliseconds and a creation rate of 150 microVMs per second, per host, it ensures scale and efficiency with low memory overhead of less than 5MB memory footprint per microVM and thousands of microVMs on each host."

The reason this got people so excited is because it brings a performance step change from Fargate, an AWS compute engine which allows customers to run containers without having to manage servers or clusters.

In his Twitch demo of the technology, Anthony Liguori launched 4,000 virtual machines, with the slowest taking 219 milliseconds.

"With Firecracker you can see we are making the same deep investments in our infrastructure to support serverless computing as we have with EC2 instances," Mesrobian added.

Related:
1 2 Page 1
Page 1 of 2
9 steps to lock down corporate browsers