function as a service (FaaS) What is a private cloud? Definition and examples
X
Definition

What is serverless computing?

Serverless computing is a cloud computing execution model that lets software developers build and run applications and servers without having to provision or manage the back-end infrastructure. With serverless technologies, the cloud vendor takes care of all routine infrastructure management and maintenance, including updating the operating system (OS), applying patches, managing security, monitoring the system and planning capacity.

With serverless computing, developers purchase back-end services from cloud services vendors on a pay-as-you-go basis, which means they pay only for the services used. The main goal of serverless computing is to make it simpler for developers to write code designed to run on cloud platforms and perform a specific role.

How serverless computing works

With serverless computing, developers don't have to manage machine instances in the cloud. Instead, they run code on cloud servers without having to configure or maintain them. Pricing is based on the actual number of resources an application consumes rather than on prepurchased units of capacity.

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

With a serverless model, developers write a function in their preferred programming language and post it to a serverless provider's platform. A function is business logic, where a task is performed once a specific event triggers it. For example, an automatic response to an email with a certain subject line is a function.

The cloud service provider manages the infrastructure and software and maps the function to an application programming interface endpoint. Users interact with the API to use the function and carry out tasks. The API allows many different instances of the function to run at once, accommodating many users until the function reaches a given limit, known as the concurrency limit.

Why is serverless computing important?

Serverless computing plays an important part in digital transformation. First, it lets developers focus on writing and deploying code without having to worry about the underlying infrastructure that supports code execution. Regardless of the industry or company size, a serverless computing strategy eliminates management overhead to increase developer productivity.

This is especially useful for startups or small and midsize businesses that don't have the budget to implement and support physical infrastructure. With serverless, they only pay for the computing resources they use. They also can pick and choose services from providers that suit their needs. Application development teams can focus on user-facing applications rather than managing infrastructure. Serverless also alleviates other concerns, as providers often offer other capabilities, such as the following:

  • Security features.
  • Compliance functions.
  • Zero server management.
  • Autoscaling to meet changing traffic demands.
  • Managed integrated security.

Advantages and disadvantages of serverless computing

The advantages of serverless computing include the following:

  • Cost-effectiveness. Developers pay only for the time when code runs on a serverless compute platform. They don't pay for idle virtual machines (VMs).
  • Easy deployment. Developers deploy apps in hours or days rather than weeks or months.
  • Autoscaling. Cloud providers handle scaling up and spinning down resources or instances when the code isn't running.
  • Increased productivity. Developers spend most of their time writing and developing apps instead of dealing with servers and runtimes.

However, there are disadvantages with serverless computing:

  • Vendor lock-in. Switching cloud providers might be difficult because the way serverless services are delivered varies from vendor to vendor.
  • Long-running apps. Sometimes using long-running tasks can cost more than running a workload on a VM or dedicated server.
  • Latency. With serverless, there's a delay in the time it takes for a scalable serverless platform to handle a function for the first time. This latency is known as a cold start.
  • Debugging difficulties. 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 numerous use cases for serverless computing, including the following tasks:

  • Event-triggered computing. Serverless computing is used in scenarios involving 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 various devices and then trigger the desired events, offering a highly functional, less expensive way to manage IoT.
  • Back-end 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 is used to transfer data to long-term storage; convert, process and analyze the data; and move metrics to an analytics service.
  • Microservices support. Supporting microservices architectures is one of the most common uses of serverless computing. Although developers can use containers or platform as a service (PaaS) to build and operate microservices, they can also use serverless computing. Its inherent and automatic scaling, rapid provisioning, use of small bits of code and pricing model that only charges for resources used are useful for microservices support.
  • Building RESTful APIs. Serverless computing makes it easier to build RESTful APIs that developers can scale up on demand.
  • Video and image manipulation. Serverless computing enables developers to modify video transcoding for different devices and to resize images dynamically.
  • Writing multilanguage apps. When developers create applications, one of the first factors to consider is what language to use. Since serverless is a polyglot programming environment, developers can write code in any language or framework they choose, including Python, Node.js, Java and JavaScript.
  • Continuous integration/continuous delivery. CI/CD pipelines let developers ship small bits of code, which means they can ship bug fixes and other updates every day. Serverless architecture can automate many of the workflows in developers' CI/CD pipelines, such as pull requests triggering automated tests.
List of common serverless platform uses
Serverless platforms have various real-world applications.

Serverless vs. other cloud back-end models

There are numerous differences between serverless computing and other cloud back-end models, including infrastructure as a service (IaaS), backend as a service (BaaS) and PaaS.

Serverless vs. IaaS

Under the IaaS cloud computing model, developers pre-purchase units of capacity, rather than purchasing on demand as with serverless computing. This means organizations pay public cloud vendors for server components that are always on to run the main components of their applications.

Consequently, an organization's server administrator and tech team are responsible for estimating the company's average monthly use capacity to select a pricing plan that meets its needs.

However, serverless architecture applications are only deployed when necessary, as an event triggers the application code to run. The public cloud vendor allocates the resources needed for that operation to run, and the company stops paying when the code finishes running.

Serverless vs. BaaS

One of the primary differences between BaaS and serverless computing is scalability. With serverless, the scale of the application automatically increases depending on app use. The cloud provider's infrastructure automatically assigns the servers or containers needed to initiate this increase.

BaaS might not automatically scale an application because some BaaS platforms have a request-per-second limitation to prevent automated scaling. However, many BaaS vendors offer platforms that work much like serverless computing, scaling apps automatically.

In addition, since serverless architecture is event-driven, they run in response to events. BaaS apps are typically not event-driven, which means they need more server resources.

Serverless vs. PaaS

Scaling up and down is easy with serverless apps because they depend on demand and don't require developer intervention.

While PaaS offerings also enable scalability, developers must set up the scaling parameters. In general, PaaS provides developers with better control over their deployment environments than serverless computing.

With serverless, developers only pay for what they use. With PaaS, developers typically pay a monthly fee for services -- no matter how much they use -- which is much more predictable and could end up being less expensive.

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 data centers, databases, storage, messaging, data analytics, machine learning and smart assistants.

Some serverless cloud services provide scalability and cost savings, but they can create additional complexities. For example, constrained runtimes and vendor lock-in must be considered when choosing a serverless architecture.

Developers often face a hard tradeoff between the ease and velocity of serverless computing and the flexibility and portability of containers. Most organizations benefit from a full-stack approach rather than limiting serverless to compute functions.

Serverless computing vendors and languages

The major serverless computing vendors, and the programming languages they support, include the following:

  • Alibaba Cloud Function Compute. This service was released in 2017, making Alibaba Cloud one of the first Chinese cloud vendors to provide serverless computing services. It supports Node.js, Python, Java, Hypertext Preprocessor (PHP) and C#.
  • Amazon Web Services (AWS) Lambda. This function as a service (FaaS) offering from AWS was introduced in 2014. AWS Lambda functions can be written in Java, Go, PowerShell, Node.js, JavaScript, C#, Python and Ruby.
  • Google Cloud Functions. Released by Google in 2017, this service supports Node.js, JavaScript, Python, Go, PHP, .NET and Ruby but allows for unlimited function execution time. Google Cloud Functions can also interact with other Google services, enabling 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, IBM Cloud Functions supports JavaScript (Node.js), Swift, Python, Ruby, PHP, .NET and others. It runs functions written in JavaScript and in any language that can be compiled into WebAssembly.
  • Microsoft Azure Functions. Microsoft rolled out Azure Functions in 2016 to compete with AWS Lambda. It supports C#, Java, JavaScript (Node.js), PowerShell, Python and TypeScript.
  • Oracle Cloud Infrastructure Functions. Released in 2019, OCI Functions (formerly Oracle Functions) integrates with Oracle Cloud Infrastructure platform services and SaaS applications. Oracle Functions is based on the open source Fn Project. It supports Java, Python, Node.js, Go, Ruby and C#. For advanced use cases, developers can bring their own Dockerfiles and GraalVM.

      Best practices for securing serverless applications

      There are certain best practices for reducing cyberattacks and other security risks to serverless environments. They include the following:

      • Using APIs. Requiring data from the client side to pass through an API means an extra layer of security, protecting the back-end serverless applications. This helps ensure malicious users don't succeed in conducting cyberattacks through data transfer.
      • Optimizing security. Security measures such as encryption and multifactor authentication should be applied to various serverless application resources. Since serverless apps can contain many different microservices, each would have to be protected to reduce the number of attack surfaces bad actors could exploit.
      • Setting permissions and privileges. Application users should only be granted the permissions and privileges needed to perform specific tasks. This is known as the principle of least privilege.
      • Monitoring and logging use. User activity with a serverless function or microservice should be logged and monitored consistently to identify errors and stop suspicious activity before harm is done.
      • Limit access using virtual private clouds. VPCs can be configured with their own security features, such as virtual firewalls, to protect resources.

      Future of serverless computing

      The global serverless computing market is expected to increase by more than 23% from 2025 to 2030, according to a Mordor Intelligence report. This means businesses understand the convenience of developing and deploying customized apps without the burden and cost of managing hardware. The following serverless computing trends are expected to continue:

      • Market competition. Cloud providers will offer more serverless services to compete with others in the market.
      • Serverless at the edge. Edge computing and machine learning platforms will continue to integrate serverless applications. Edge computing devices must be placed closer to data collection sources. Serverless makes this easier because no physical servers are needed.
      • Serverless containers. Use of serverless containers will expand as businesses see benefits in customization and orchestration of containers to build full software apps, while providers take care of the underlying infrastructure.

      Many trends are shaping the serverless market today. Learn about the state of the serverless market.

      This was last updated in February 2025

      Continue Reading About What is serverless computing?

      Dig Deeper on Systems automation and orchestration