Normally, with the phrase cloud computing we mean the style of on-demand delivery of compute power, applications, and other IT resources with pay-as-you-go pricing. Traditionally, we had three type of cloud computing service models – Infrastructure as a Service (IaaS), Platform as a Service (PaaS) and Software as a Service (SaaS). There are hundreds of other “as a service” but most of them either fall in the category of these three or do not quality to be a cloud computing service at all. Usually there are five characters of any cloud computing service models – on-demand self-service, broad network access, multi-tenancy and resource pooling, elasticity and scalability, the service should a measured service.
A serverless function is just one function within or for an application. A user can create this function and run the function in various ways – from a static webpage, from an IoT device, or a fully functioning website. None of our known cloud computing models could be delivered in this way – we could not run a custom PHP function on some IaaS or PaaS in the manner of serverless.
(Illustration by gocd.org, GoCD is an open source software excellent for modeling complex CD workflows)
Definitely there were custom API based access to some of web services like the transaction email services. But we could not create a custom script to run in that fashion. Whenever we wanted to run a custom script, we had to either use a PaaS or a SaaS service. Serverless is a misnomer from the backend. It is named “serverless” because with this cloud computing service model, users only pay for the time and resources used when the service runs and any other services which get consumed in the process. So, lesser the number of our such “paid to run” scripts will be, lesser will be the cost. Lesser the number of times the service will be called to work, lesser will be the cost. If we build a static website which will get some traffic and uses some serverless function (like for the “contact us” form), then it is possible that in some month the function used by none resulting in a zero bill. Serverless is a form of utility computing. This is great for the future IoT devices because unless we execute the script, we have no cost. In the present era, serverless does not have extensive use-cases. With serverless, we are getting the following benefits :
- No need of extensive infrastructure planning
- Pay per run
PaaS could not reduce the manual work to make it pay per run. PaaS offers a lot of features suitable to the developers but it has some common problem shared with IaaS.