Compare Cloud Run functions

This guide compares the latest and original Google Cloud choices for deploying functions. This page helps those who previously created functions with the Cloud Functions API and are transitioning to the Cloud Run Admin API. This page describes key differences in several areas, such as concepts, configuration, deployment, and triggers and retries.

Comparison

There are two versions of Cloud Run functions:

  • Cloud Run functions, is the latest version of functions, deployed as a service on Cloud Run. They can be created in one of the following ways:

    • Cloud Run Admin API (Recommended): Functions created with this API (for example, by using Google Cloud console, gcloud run, the REST API, or Terraform) can be managed exclusively using the Cloud Run Admin API.
    • Cloud Functions v2 API: Functions created with this API (for example, by using gcloud functions, the REST API, or Terraform) can be managed with the Cloud Run Admin API as well as the Cloud Functions v2 API. When using this API, you specify the trigger when deploying your function. Learn how to detach a v2 API function so that it can be managed exclusively using the Cloud Run Admin API.
  • Cloud Run functions (1st gen), formerly known as Cloud Functions (1st gen), is the original version of functions with limited event triggers, runtimes, and configurability. Learn how to upgrade your 1st gen functions to Cloud Run.

By deploying functions directly onto Cloud Run, your functions are automatically built as containers and deployed as a Cloud Run service.

Concepts

The following table summarizes the conceptual differences for functions.

Cloud Run functions Cloud Run functions (1st gen)
Former product name Cloud Functions (2nd gen) Cloud Functions (1st gen)
Resource model A function is a Cloud Run service that is deployed from source code A function is deployed from source code
Types of functions terminology
  • HTTP functions
  • CloudEvents functions, also referred to as event-driven functions, are supported in all language runtimes.
  • HTTP functions
  • Only Ruby, .NET, and PHP runtimes support CloudEvents. For Node.js, Go, Python, and Java, create event-driven functions using Background functions.