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."

Related:
1 2 Page 1
Page 1 of 2
Download: EMM vendor comparison chart 2019