What is serverless computing?

Last updated: 07/13/2026

Serverless computing is a cloud computing execution model that allocates machine resources on an as-used basis. Under a serverless model, developers can build and run applications without having to manage any servers and pay only for the exact amount of resources used. Instead, the cloud service provider is responsible for provisioning, managing, and scaling the cloud infrastructure that runs the application code.

Serverless computing, despite its name, doesn't eliminate servers. Rather, it streamlines application development by abstracting away routine infrastructure tasks. This means you don't see, configure, manage, or scale the underlying machines running your applications. Essentially, you pay for the server's service, not the server itself.

From the development perspective, it’s as if there are no servers at all — developers write the code, deploy it to production, and the cloud provider handles the rest.

Understand how Google Cloud makes serverless work for you

Serverless computing types

Within serverless cloud computing, there are generally two types of services: Function as a Service (FaaS) and Backend as a Service (BaaS). 

  • FaaS: provides the computing resources needed to execute application logic in response to requests. These pieces of logic (or functions) are run in containers that are fully managed by the cloud service provider. Serverless applications are typically broken into single functions that perform one action in response to an event. 
  • BaaS: delivers the entire backend functionality of web or mobile applications as a service, such as authentication services, database management, cloud storage, push notifications, and hosting. BaaS also removes the need to manage servers, containers, or virtual machines.

Within development, the term “serverless” is usually used to describe FaaS offerings. However, it’s important to note that FaaS is technically a subset of serverless technology. Serverless computing includes any type of service where the server management, configuration, scaling, and billing are abstracted from the end user. This can include databases, storage, event streaming, messaging, and API gateways. 

How does serverless computing work?

When it comes to building applications, developers normally have a host of other server management tasks they need to carry out in order to deploy their code, such as defining resources for processing and storage, patching, load balancing, and more. All of these extra items lead to longer provisioning times and additional operational overhead that ultimately slows down development teams. 

Serverless computing attempts to provide an invisible “serverless” experience for developers, eliminating the need to think about servers or anything an application might need to run. Instead, the service provider does all the work behind the scenes to ensure you have the resources to execute your code and meet requirements without being charged for idle capacity. 

Understanding serverless computing

Think of serverless like getting water to your home. You could dig your own well, test the water quality, and install and maintain all the external plumbing needed to run it into the house. Or, you can connect to your city’s main water supply. You just turn the water tap and get as much water as you want exactly when you need it, and the city sends you a monthly bill for the exact amount of water you consume. 

Similarly, cloud providers automatically spin up the infrastructure resources and runtime environments needed to execute your serverless apps and automatically scale back down to zero when the execution is complete. Typically, you are charged based on the resources during the execution time. However, this can vary depending on the service and the vendor. 

Serverless versus other types of cloud computing

But wait, don’t other types of cloud computing provide on-demand resources on a pay-as-you-go basis? It’s true that cloud service models like Infrastructure as a Service (IaaS) and Platform as a Service (PaaS) also provide on-demand access to computing resources. 

However, the cloud infrastructure allocated to you remains active even if you’re not using it. It’s also your responsibility to scale server capacity or configure your applications to scale up or down in response to user demand. 

Serverless architectures are event-driven. Under this model, the provider only gives you resources when an event triggers your code to run and will scale instantly and automatically to requests.

Comparison of cloud computing models

Feature

Serverless

PaaS

Containers

VMs

Administrative burden

Minimal

Medium

Medium to high

High

Cost model


Pay-per-use

Pay-per-instance

Pay-per-container

Pay-per-VM

Maintenance requirements

None

Low

Medium

High

Scalability

Automatic and instant

Manual or auto-scaling

Manual or auto-scaling

Manual or auto-scaling

Statelessness

Typically stateless

Can be stateful or stateless

Can be stateful or stateless

Can be stateful or stateless

Feature

Serverless

PaaS

Containers

VMs

Administrative burden

Minimal

Medium

Medium to high

High

Cost model


Pay-per-use

Pay-per-instance

Pay-per-container

Pay-per-VM

Maintenance requirements

None

Low

Medium

High

Scalability

Automatic and instant

Manual or auto-scaling

Manual or auto-scaling

Manual or auto-scaling

Statelessness

Typically stateless

Can be stateful or stateless

Can be stateful or stateless

Can be stateful or stateless

Solve your business challenges with Google Cloud

New customers get $300 in free credits to spend on Google Cloud.
Talk to a Google Cloud sales specialist to discuss your unique challenge in more detail.

Advantages of serverless computing

Better developer productivity 

Serverless-empowered developers focus on writing code and optimizing business logic instead of worrying about provisioning, managing, or scaling infrastructure. 

Out-of-box scalability

Serverless architectures scale up or down inherently. Unlike autoscaling in other types of cloud computing, which requires fine-tuning rules, serverless autoscaling is instant and can scale down to zero. 

Flexible pricing

Serverless pricing models are often charged based on actual usage and the time it takes to execute a function. You also don’t pay for idle capacity, helping to lower operational costs associated with running and managing your own servers.

Faster deployment

Serverless computing can help reduce the friction of infrastructure definition for DevOps teams when it comes to integration, testing, delivery, and deployment. They can then zero in on writing and deploying code straight to production.

Use any language

Serverless environments support any language or framework, allowing teams to develop in the language or with the framework—Go, Python, Java, Node.js, .NET, and more—they are most comfortable.

Serverless computing use cases

Some of the most common and emerging serverless computing examples include: 

Seamlessly sync leads/customers between different business applications (example CRM to marketing automation).

Automate the generation and distribution of routine reports.

Reduce cloud costs by automatically identifying and managing idle compute resources.

  • Serverless solution: A nightly Cloud Scheduler job triggers Cloud run functions via Pub/Sub. This function uses the Compute Engine API and Cloud Monitoring to identify idle instances and automatically stops or deletes them, logging actions to Cloud Logging.
  • Related products: Cloud Scheduler, Pub/Sub, Cloud Run, Cloud Monitoring, Cloud Logging.

Process and enrich high-volume streaming data (example user activity) for immediate insights and actions.

  • Serverless solution: User clickstream events are streamed to Pub/Sub. Cloud Run consumes these events, enriches them with data from Firestore, and then publishes the enriched data to another Pub/Sub topic for real-time analytics in BigQuery or personalized recommendations.
  • Related products: Pub/Sub, Cloud Run, Firestore, BigQuery.

Automate the build, test, and deployment of microservices upon code changes.

  • Serverless solution: A Cloud Build trigger monitors a Git repository (example Cloud Source Repositories). Upon code commit, Cloud Build runs tests, builds a container image to Artifact Registry, and automatically deploys the new version to Cloud Run.
  • Related products: Cloud Build, Cloud Run, Artifact Registry, Cloud Source Repositories.

Automatically generate optimized image variants (example thumbnails, different formats) upon upload.

Perform real-time AI inference using recent LLMs.

  • Serverless solution: Cloud Run integrates with AI models such as Gemini API, endpoints (including those serving Gemini models), or models hosted on a GPU-enabled Cloud Run service. It can also acts as a scalable API endpoint and host AI agents.
  • Related products: Cloud Run, Cloud Storage, Firestore.

Disadvantages of serverless computing

One of the biggest disadvantages of serverless computing is that it is still a relatively new technology. As a result, it is not yet suitable to meet all potential use cases. 

It’s also clear that some of the current weaknesses that exist will be solved over time as serverless computing continues to evolve. In particular, a lot of work is already being done on open source implementations of serverless and finding ways to make cloud services more open to make solutions portable across different platforms and environments. 

  • Limited use case suitability: Serverless architectures are not always suitable for applications with specific requirements, such as long-running processes or very low latency needs
  • Performance constraints: Serverless functions may experience cold starts (delayed initial execution) and may have limitations on execution time and memory
  • Vendor lock-in: Migrating serverless applications between cloud providers can be complex due to differences in APIs and configurations
  • Reduced server visibility: Developers have limited visibility into the underlying infrastructure, making it difficult to troubleshoot performance issues or optimize resource utilization
  • Slow startup: Serverless functions can sometimes experience a "cold start" where there is a delay in invoking the function, which can impact latency

Take the next step

Start building on Google Cloud with $300 in free credits and 20+ always free products.

Google Cloud