Serverless

Quickly build and deploy serverless applications

Our serverless platform provides the fastest path to cloud native applications, enabling speed and scalability without worrying about managing infrastructure.

Overview

Focus on your application, not your infrastructure

Cloud Run takes care of the infrastructure setup, maintenance, and management for you, so you can spend more time coding, and less time managing servers, configuring software, and updating frameworks.

Build event-driven architectures with Cloud Run functions

Bring lightweight, single-purpose code snippets that react dynamically to state changes across your ecosystem. Trigger workloads seamlessly via Eventarc from more than 130 native Google Cloud services, database mutations, or third-party SaaS webhooks. Resources are allocated instantly upon trigger and spin down automatically.

Dynamic autoscaling and scale to zero

Navigate unpredictable traffic surges without worrying about over-provisioning or over-paying for infrastructure. Our platform dynamically autoscales instances up to handle heavy concurrent request volumes and scales to zero during idle periods. With pay-per-use pricing, you’re only charged when your services are running. 

Container portability with source-based flexibility

Maintain architectural freedom by deploying standard, OCI-compliant container images, or deploy raw source code directly and built-in Google Cloud buildpacks will automatically compile, package, and containerize the code securely behind the scenes.

Google Cloud serverless

Google Cloud serverlessBuild end-to-end architectures without managing infrastructure
Service categorySupported productsDescription

Serverless compute

Deploy containerized microservices, APIs, background jobs, and event-driven functions with automatic scale-to-zero and source-to-cloud workflows.

Serverless orchestration

Connect microservices, route events seamlessly from 100+ sources, and automate multi-step, resilient business logic with built-in retry mechanisms.

Serverless NoSQL and object storage

Store unstructured data and power web/mobile apps with serverless document databases offering real-time synchronization, ACID transactions, and high availability.

Serverless relational databases

Run fully managed MySQL, PostgreSQL, and enterprise workloads with automatic scaling, replication, automated patching, and built-in vector search.

Google Cloud serverless

Build end-to-end architectures without managing infrastructure

Serverless compute

Supported products
Description

Deploy containerized microservices, APIs, background jobs, and event-driven functions with automatic scale-to-zero and source-to-cloud workflows.

Serverless orchestration

Supported products
Description

Connect microservices, route events seamlessly from 100+ sources, and automate multi-step, resilient business logic with built-in retry mechanisms.

Serverless NoSQL and object storage

Supported products
Description

Store unstructured data and power web/mobile apps with serverless document databases offering real-time synchronization, ACID transactions, and high availability.

Serverless relational databases

Supported products
Description

Run fully managed MySQL, PostgreSQL, and enterprise workloads with automatic scaling, replication, automated patching, and built-in vector search.

How It Works

1. Code apps, websites, microservices, agents, and more in your favorite language

2. Package your app into a container—or deploy from source code and let Cloud Run package it for you

3. Deploy your app live with one command

4. Autoscale your containers up and down to zero based on the traffic your app is getting

How Cloud Run works
How Cloud Run Works
Common Uses

Websites and web applications

Build websites with Cloud Run

Build your website with Cloud Run using your favorite language or framework (Go, Python, Java, Node.js, .NET, and more), access your SQL database on Cloud SQL, and render dynamic HTML pages.

Lightweight architecture diagram
    Build websites with Cloud Run

    Build your website with Cloud Run using your favorite language or framework (Go, Python, Java, Node.js, .NET, and more), access your SQL database on Cloud SQL, and render dynamic HTML pages.

    Lightweight architecture diagram

      Gen AI apps and agents

      Serving and orchestration

      Request-response flow between the gen AI app and its users. Run LangChain to orchestrate retrieval-augmented generation (RAG), prepare prompts, call inference endpoints, stream responses.

        Serving and orchestration

        Request-response flow between the gen AI app and its users. Run LangChain to orchestrate retrieval-augmented generation (RAG), prepare prompts, call inference endpoints, stream responses.

          On-demand AI inference with GPUs

          Power real-time inference

          Use Cloud Run GPUs to power real-time inference with open source or custom fine-tuned models. Build chatbots, generate on-the-fly document summaries, and more—all while scaling to handle unpredictable traffic spikes. Or, with GPUs on Cloud Run functions, your data scientists can run Python scripts and perform event-driven inference with limited knowledge of the underlying infrastructure.

          Lightweight architecture diagram
            Power real-time inference

            Use Cloud Run GPUs to power real-time inference with open source or custom fine-tuned models. Build chatbots, generate on-the-fly document summaries, and more—all while scaling to handle unpredictable traffic spikes. Or, with GPUs on Cloud Run functions, your data scientists can run Python scripts and perform event-driven inference with limited knowledge of the underlying infrastructure.

            Lightweight architecture diagram

              Secure serverless database connectivity

              Connect to databases from Cloud Run

              Google Cloud offers native, high-performance connectivity from Cloud Run and Cloud Run functions to Cloud SQL for PostgreSQL, MySQL, and SQL Server. As a premier cloud serverless database solution, Cloud SQL utilizes built-in, IAM-based authentication and automated connection pooling. This allows your serverless applications to scale elastically from zero to meet heavy traffic demands without bottlenecking relational workflows, exposing database credentials, or requiring complex network configurations.

                Connect to databases from Cloud Run

                Google Cloud offers native, high-performance connectivity from Cloud Run and Cloud Run functions to Cloud SQL for PostgreSQL, MySQL, and SQL Server. As a premier cloud serverless database solution, Cloud SQL utilizes built-in, IAM-based authentication and automated connection pooling. This allows your serverless applications to scale elastically from zero to meet heavy traffic demands without bottlenecking relational workflows, exposing database credentials, or requiring complex network configurations.

                  Start your proof of concept

                  Get two million requests free per month on Cloud Run

                  Have a large project?

                  Deploy a sample container

                  Connect to Google Cloud services

                  Run an existing web service

                  FAQ

                  Frequently asked questions

                  What products are included in Google Cloud serverless?

                  Google Cloud serverless combines containerized microservices and event-driven functions (Cloud Run, App Engine), orchestration/eventing (Eventarc, Workflows, Pub/Sub), and fully managed databases and storage (Cloud SQL, Firestore, AlloyDB, Cloud Storage).

                  Cloud Run is the foundational platform, offering a fully managed environment for web applications, microservices, and background jobs without underlying infrastructure management.

                  No. While the platform uses container technology, containerization is entirely optional. You can submit raw code (Python, Go, Node.js, Java), and Cloud Run will automatically build, secure, and deploy it.

                  You operate on a strict pay-per-use model billed to the nearest 100 milliseconds of actual execution time. When idle, instances scale down to zero ($0 cost). Every account includes a permanent free tier of 2 million requests per month.

                  Because serverless apps can instantly scale to hundreds of concurrent instances, database connection pooling (using built-in poolers or a dedicated middleware proxy like the Cloud SQL proxy) is essential to safely queue and reuse database connections as compute scales.

                  Serverless computing
                  Google Cloud