function as a service (FaaS) What is a private cloud?

serverless computing

Serverless computing is an event-driven application design and deployment paradigm in which computing resources are provided as scalable cloud services. In traditional application deployments, the server’s computing resources represent fixed and recurring costs, regardless of the amount of computing work that is actually being performed by the server. In a serverless computing deployment, the cloud customer only pays for service usage; there is never any cost associated with idle, down-time.

Serverless computing does not eliminate servers, but instead seeks to emphasize the idea that computing resource considerations can be moved into the background during the design process. Developers can drop in code, create backend applications, create event handling routines and process data – all without worrying about servers, virtual machines (VMs) or the underlying compute resources because the actual hardware and infrastructure involved are all maintained by the provider.

The term serverless computing is often associated with the NoOps movement and the concept may also be referred to as serverless cloud computing, function as a service (FaaS) or runtime as a service (RaaS).

How serverless computing works

With serverless computing, developers don’t have to deal with managing machine instances in the cloud. Instead, they can run code on cloud servers without having to configure or maintain the servers at all. Pricing is based on the actual amount of resources consumed by an application, rather than on pre-purchased units of capacity.

Typically, if developers host their applications on virtual servers based in the cloud, they have to set up and manage those servers, install operating systems on them, monitor them and continually update the software.

With the serverless model, a developer can write a function in his or her favorite programming language and posts it to a serverless platform. The cloud service provider manages the infrastructure and the software and maps the function to an API endpoint, transparently scaling function instances on demand.

Role of serverless computing in digital transformation

Serverless computing plays an important part in digital transformation. First, it enables developers to be more productive by helping them focus on writing code that has business value, without having to worry about the underlying infrastructure that will support the code. Regardless of vertical industry or company size, a serverless computing strategy can help increase developer productivity by eliminating management overhead.  

Features of a serverless computing software development environment include:

  • zero server management
  • auto-scaling to meet changing traffic demands
  • managed integrated security

What to look for in a serverless architecture

Organizations should look for serverless platforms that help them develop applications end-to-end,  tapping services across databases, storage, messaging, data analytics, machine learning and smart assistants.

Some serverless  cloud services provide scalability and cost savings, but create additional complexities - like constrained runtimes or vendor lock-in, so that's also an important consideration when choosing a serverless architecture.

Developers often face a hard trade-off between the ease and velocity of serverless and the flexibility and portability of containers. This is why most organizations benefit from a full-stack approach, rather than limiting serverless to compute functions.

Advantages and disadvantages of serverless computing

The advantages of serverless computing include:

  • Cost-effective - Users and developers just have to pay for the time that code is running on a serverless compute platform. They don’t have to pay for virtual machines sitting idle.
  • Easy to deploy - Developers can deploy apps in hours or days rather than weeks or months.
  • Auto scaling - Cloud providers handle the scaling up or spinning down when the code’s not running.
  • Increased developer productivity - Developers can spend most of their time writing and developing apps, instead of dealing with servers and runtimes.

Disadvantages of serverless computing include:

  • Vendor lock-in - Switching cloud providers may be difficult since the way serverless services are delivered may differ from one vendor to another.
  • Not efficient for long-running apps - Sometimes using long tasks can cost much more than running a workload on a virtual machine or dedicated server.
  • Latency - There is a delay in the time it takes for a scalable serverless platform to handle a function for the first time, often known as a cold start.
  • Debugging is more difficult - Because a serverless instance creates a new version of itself each time it spins up, it’s hard to amass the data needed to debug and fix a serverless function.

Serverless computing use cases

There are number of use cases for serverless computing, including:

  • Event-triggered computing - For scenarios that involve numerous devices accessing various file types, such as mobile phones and PCs uploading videos, text files and images.
  • Internet of things (IoT) data processing - Serverless computing provides a way to combine and analyze data from a variety of devices and then trigger the desired events, offering a highly functional, less expensive way to manage IoT.
  • Backend tasks for mobile apps or websites - A serverless function can take a request, such as for information from a user database, from the front end of the site or application, retrieve the information and hand it back to the front end.
  • High volume background processes - Serverless can be used to transfer data to long-term storage, convert, process and analyze the data and move metrics to an analytics service.
serverless apps

Serverless computing vendors and languages

The major serverless computing vendors include:

  • Google Cloud Functions. Released by Google in 2017, it supports Node.js JavaScript, Python and Go, but allows for unlimited execution time for functions. Google Cloud Functions can also interact with many other Google services, allowing developers to quickly create and manage complex enterprise-class applications with almost no consideration of the underlying servers.
  • IBM Cloud Functions. Based on Apache OpenWhisk, it supports JavaScript (Node.js), Swift, and Cloudflare Workers, which runs functions written in JavaScript as well as any language that can be compiled to WebAssembly.
  • AWS Lambda. Introduced in 2014, it is a FaaS offering from Amazon Web Services (AWS). AWS Lambda functions can be written in Java, Go, PowerShell, Node.js JavaScript, C#, Python and Ruby.
  • Microsoft Azure Functions. Microsoft rolled Azure Functions out in 2016 to compete with AWS Lambda. It supports Bash, Batch, C#, F#, Java, JavaScript (Node.js), PHP, PowerShell, Python and TypeScript.

Development tools

There are a number of tools from third-party vendors that developers can use when they’re working with serverless computing, including:

  • LambCI - A package that can be uploaded to AWS Lambda to bring continuous integration (CI) to serverless.
  • Clay - A registry for microservices that can be used to instantly create an HTTPS
  • Node Lambda - Created in 2009 as an open source project, it is a command line tool that helps JavaScript developers share packaged modules of code. It lets developers locally run and deploy their Node.js apps to AWS Lambda.
  • Gordon - An open source platform that lets developers create, wire and deploy AWS Lambda functions using CloudFormation.
  • Back& - A single platform that lets developers run multi-cloud and serverless applications. It provides database as a service (DBaaS), function as a service (FaaS), security as a service (SaaS) and integration as a service (IaaS).
This was last updated in August 2019

Continue Reading About serverless computing

Dig Deeper on Systems automation and orchestration