What is serverless computing?
Explore IBM's serverless solution Subscribe for cloud updates
Illustration with collage of pictograms of computer monitor, server, clouds, dots
What is serverless computing?

Serverless computing is an application development and execution model that enables developers to build and run application code without provisioning or managing servers or backend infrastructure.

Serverless lets developers put all their focus into writing the best front-end application code and business logic they can. All that the developers need to do is write their application code and deploy it to containers managed by a cloud service provider. The cloud provider handles the rest, provisioning the cloud infrastructure that is required to run the code and scaling the infrastructure up and down on demand as needed. The cloud provider is also responsible for all routine infrastructure management and maintenance such as operating system updates and patches, security management, capacity planning, system monitoring and more.

Also important: With serverless, developers never pay for idle capacity. The cloud provider spins up and provisions the required computing resources on demand when the code executes and spins them back down again—called ‘scaling to zero’—when execution stops. The billing starts when execution starts and ends when execution stops; typically, pricing is based on execution time and resources required.

Realize the full value of your hybrid cloud

Connect and integrate your systems to prepare your infrastructure for AI.

Related content

Register for the guide on app modernization

Serverless does not mean ‘no servers’

The name notwithstanding, there are servers in serverless computing. 'Serverless' describes the developer’s experience with those servers—they are invisible to the developer, who doesn't see them, manage them, or interact with them in any way.

Today every leading cloud service provider offers a serverless platform including Amazon Web Services (AWS Lambda), Microsoft Azure (Azure Functions), Google Cloud (Google Cloud Functions) and IBM Cloud® (IBM Cloud Code Engine). Together serverless computing, microservices and containers form a triumvirate of technologies that are typically considered to be at the core of cloud-native application development.

Serverless is more than just FaaS

Function-as-a-service, or FaaS, is a cloud computing service that enables developers to run code or containers in response to specific events or requests, without specifying or managing the infrastructure that is required to run to code.

FaaS is the compute model central to serverless and the two terms are often used interchangeably. But serverless is more than FaaS. Serverless is an entire stack of services that can respond to specific events or requests and scale to zero when no longer in use—and for which provisioning, management and billing are handled by the cloud provider and invisible to developers. In addition to FaaS, these services include:

  • Serverless databases and storage: Databases (SQL and NoSQL) and storage (particularly object storage) are the foundation of the data layer. A serverless approach to these technologies involves transitioning away from provisioning “instances” with defined capacity, connection and query limits and moving toward models that scale linearly with demand in both infrastructure and pricing.

  • Event streaming and messaging: Serverless architectures work well for event-driven and stream-processing workloads most notably the open source Apache Kafka event streaming platform.

  • API gateways: API gateways act as proxies to web actions and provide HTTP method routing, client ID and secrets, rate limits, CORS, viewing API usage, viewing response logs and API sharing policies.

Ashher Syed from IBM provides a detailed explanation of serverless and the serverless stack (6:37):

Serverless vs. PaaS, containers and VMs

Because serverless, platform as a service (PaaS), containers and virtual machines (VMs) all play a critical role in the cloud application development and compute ecosystem, it’s useful to measure how serverless compares to the others across some key attributes.

  • Provisioning time: Measured in milliseconds for serverless, vs. minutes to hours for the other models.


  • Administrative burden: None for serverless, compared to a continuum from light to medium to heavy for PaaS, containers and VMs respectively.


  • Maintenance: Serverless architectures are managed 100% by the provider. The same is true for PaaS, but containers and VMs require significant maintenance including updating and managing operating systems, container images, connections, and so on.


  • Scaling: Auto-scaling—including auto-scaling to zero—is instant and inherent for serverless. The other models offer automatic but slow scaling that requires careful tuning of auto-scaling rules and no scaling to zero.


  • Capacity planning: None needed for serverless. The other models require a mix of some automatic scalability and some capacity planning.


  • Statelessness: Inherent for serverless, which means scalability is never a problem; state is maintained in an external service or resource. PaaS, containers and VMs can use HTTP, keep an open socket or connection for long periods of time and store state in memory between calls.


  • High availability (HA) and disaster recovery (DR): Both are inherent in serverless with no extra effort and at no additional cost. The other models require additional cost and management effort. Infrastructure can be restarted automatically with both VMs and containers.

  • Resource utilization: Serverless is 100% efficient because there is no such thing as idle capacity—it is invoked only upon request. All other models feature at least some degree of idle capacity.


  • Billing granularity and savings: Serverless is metered in units of 100 milliseconds. PaaS, containers and VMs are typically metered by the hour or the minute.

Serverless, Kubernetes and Knative

Kubernetes is an open-source container orchestration platform that automates the deployment, management and scaling of containers. Kubernetes' automation dramatically simplifies the development of container-based applications.

Serverless applications are often deployed in containers. But on its own, Kubernetes can't run serverless apps without specialized software that integrates Kubernetes with a specific cloud provider's serverless platform.

Knative provides a serverless framework for Kubernetes. It’s an open-source extension to Kubernetes that enables any container to run as a serverless workload on any cloud platform that runs Kubernetes, whether the container is built around a serverless function or some other application code (for example, microservices). Knative works by abstracting away the code and handling the network routing, event triggers and autoscaling for serverless execution.

Knative is transparent to developers—they just build a container as usual using Kubernetes and Knative does the rest, running the container as a serverless workload.

Learn more about Knative

Pros and cons of serverless


Given all of the preceding, it should be no surprise that serverless computing offers various technical and business benefits to individual developers and enterprise development teams.

Improved developer productivity: As noted, serverless enables development teams to focus on writing code, not managing infrastructure. It gives developers much more time to innovate and optimize their front-end application functionality and business logic.

Pay for execution only: The meter starts when the request is made and ends when execution finishes. Compare this to the infrastructure as a service (IaaS) compute model, where customers pay for the physical servers, virtual machines (VMs) and other resources that are required to run applications, from the time they provision those resources until the time they explicitly decommission them.

Develop in any language: Serverless is a polyglot environment, which enables developers to code in any language or framework—Java, Python, JavaScript, node.js—that they're comfortable with.

Streamlined development or DevOps cycles: Serverless simplifies deployment and in a larger sense, simplifies DevOps because developers don't spend time defining infrastructure required to integrate, test, deliver and deploy code builds into production.

Cost-effective performance: For certain workloads—embarrassingly parallel processing, stream processing, certain data processing tasks—serverless computing can be both faster and more cost-effective than other forms of compute.

Usage visibility: Serverless platforms provide near-total visibility into system and user times and can aggregate usage information systematically.

Development and IT professionals cite other specific benefits of serverless computing. You can explore them using the interactive tool below:


Use cases for serverless

Given its unique combination of attributes and benefits, serverless architecture works best on use cases around microservices, mobile backends and data and event stream processing.

Serverless and microservices

The most common use case of serverless today is supporting microservices architectures. The microservices model is focused on creating small services that do a single job and communicate with one another using APIs. While microservices can also be built and operated through either PaaS or containers, serverless gained significant momentum given its attributes around small bits of code, inherent and automatic scaling, rapid provisioning and a pricing model that never charges for idle capacity.

API backends

Any action (or function) in a serverless platform can be turned into an HTTP endpoint ready to be consumed by web clients. When enabled for web, these actions are called web actions. Once you have web actions, you can assemble them into a full-featured API with an API gateway that brings more security, OAuth support, rate limiting and custom domain support.

InstantOn (CRIU)

InstantOn takes a novel approach to support rapid startup for serverless applications. With InstantOn, during application build, you can take a checkpoint of your running Java application process and then restore that checkpoint in production. The restore is fast (in the low 100s of milliseconds), which makes it ideal for serverless. Since InstantOn is a checkpoint of your existing application, its behavior after restore is identical, including the same great throughput performance. This process enables organizations to adopt serverless for new cloud-native applications and provides the opportunity to bring serverless to existing enterprise.

Data processing

Serverless is well-suited to working with structured text, audio, image and video data around tasks such as data enrichment, transformation, validation and cleansing; as well as PDF processing, audio normalization, image processing (rotation, sharpening, noise reduction, thumbnail generation), optical character recognition (OCR) and video transcoding. For a detailed image process use case, read “How SiteSpirit got 10x faster, at 10% of the cost.”

Massively parallel compute and “Map” operations

Any type of embarrassingly parallel task is a good use case for a serverless runtime, with each parallelizable task resulting in one action invocation. Sample tasks include everything from data search and processing (specifically Cloud Object Storage), Map(-Reduce) operations and web scraping to business process automation, hyperparameter tuning, Monte Carlo simulations and genome processing.

For a detailed example, read "How a Monte Carlo simulation ran over 160x faster on a serverless architecture vs. a local machine."

Stream processing workloads

Combining managed Apache Kafka with FaaS and database or storage offers a powerful foundation for real-time buildouts of data pipelines and streaming apps. These architectures are ideally suited for working with all sorts of data stream ingestions (for validation, cleansing, enrichment, transformation), including IoT sensor data, application log data, financial market data and business data streams (from other data sources).

Common applications for serverless

In a recent IBM survey, IT professionals reported using serverless across a wide range of applications, including customer relationship management (CRM), analytics and business intelligence, finance and more:


Tutorials: Get started with serverless computing

You can expand your serverless computing skills with these tutorials:

IBM Cloud Code Engine

Run your container, application code or batch job on a fully managed container runtime.

Explore IBM Cloud Code Engine
IBM Cloud Satellite

Deploy and run apps consistently across on-premises, edge computing and public cloud environments from any cloud vendor.

Explore IBM Cloud Satellite
IBM Cloudant

The data layer for hyperscale, resilient, globally available applications, based on open source Apache CouchDB.

Explore IBM Cloudant
Resources Serverless in the enterprise, 2021

New research uncovers insights on the real-world opportunities and challenges of serverless computing.

Intro to IBM Cloud Code Engine

Go beyond functions to run all your containerized workloads - including web apps, microservices and batch jobs - on this fully managed serverless platform.

Enjoy your cloud again

Take a closer look at IBM Cloud Code Engine and the benefits it offers.

Take the next step

Serverless computing offers a simpler, more cost-effective way of building and operating applications in the cloud. Learn about IBM Cloud Code Engine, a pay-as-you-use serverless platform that lets developers deploy serverless applications and workflows with no Kubernetes skills needed.

Explore Cloud Code Engine