Serverless computing is an execution model done in a cloud. The cloud provider dynamically manages the allocation of machine resources. Pricing is based on the actual amount of resources consumed by an application, rather than on per-purchased units of capacity as in Amazon instances. It is a form of utility computing.
Serverless computing still requires servers but it abstracted away. The name “serverless computing” is used because the server management and capacity planning decisions are completely hidden from the developer or operator.
For example, storage is abstracted away in Amazon S3. It deals in objects for storage. You provide an object and S3 stores it. You don’t know how, you don’t know where. You don’t care.
There are no drives to concern yourself with. There’s no such thing as disk space. Not enough space… too much unused space… These concepts don’t exist. All of this is abstracted away.
You cannot over or under provision storage capacity in S3. S3 stores and charges exactly what you give it, nothing more, nothing less.
What S3 is to storage, server-less computing is to CPU. Take for example, Google App Engine which featured metered billing for applications that used a custom Python framework, but could not execute arbitrary code.
AWS Lambda, introduced by Amazon in 2014, was the first public cloud vendor with an abstract serverless computing offering. AWS Lambda initially supported only Node.js.[5] It now supports Python, Java, and C#, and code written in other languages can be invoked indirectly via Node.js.
Lambda deals in functions for execution. You provide function code and lambda executes it on demand. You don’t know how, you don’t know where. You don’t care.
There are no virtual machines to concern yourself with. There’s no such thing as server farm capacity. Too many idling servers… not enough servers to meet demand…. scaling groups… These concepts don’t exist. All of this is abstracted away.
Similar to S3, you cannot over or under provision execution capacity. Lambda executes and charges you for exactly for what you execute, nothing more, nothing less.
Google Cloud Platform offers Google Cloud Functions, which supports Node.js and other languages.
IBM has published OpenWhisk as an open source serverless platform. OpenWhisk includes native support for Node.js, Python, Java, and Swift, and supports other languages and runtime via Docker containers.
Microsoft Azure offers Azure Functions, which is offered both in the Azure public cloud or on-premises via Azure Stack.
In cloud computing history, each new paradigm that has arisen has moved the unit of scale, and abstracted away a set of responsibilities from the customer to the vendor.
- When using data centres, the hardware was the unit of scale and the physical hosting environment was abstracted away.
- With IAAS the operating system was the unit of scale, and the physical hardware was abstracted away.
- With PAAS the application was the unit of scale, and the OS was abstracted away.
- With serverless technologies the function is the unit of scale and the language runtime is abstracted away.
The vendors like Amazon, Google, IBM, Microsoft now take care of the vast majority of the stack so that developers can focus almost entirely on code.
The next big deal for cloud computing is server-less computing and it will change the way that developers build cloud applications. It is still in the innovation trigger stage of Gartner’s hype cycle and can take up to five years to become mainstream.