Cloud Run functions version comparison
There are two versions of Cloud Run functions:
- Cloud Run functions, formerly known as Cloud Functions (2nd gen), which deploys your function as services on Cloud Run, allowing you to trigger them using Eventarc and Pub/Sub.
- Cloud Run functions (1st gen), formerly known as Cloud Functions (1st gen), the original version of functions with limited event triggers and configurability.
We recommend that you choose Cloud Run functions for new functions wherever possible. However, we plan to continue supporting Cloud Run functions (1st gen).
This page describes features introduced in Cloud Run functions and provides a comparison between the two product versions.
Cloud Run functions
Cloud Run functions is Google Cloud's next-generation Functions-as-a-Service offering. Built on Cloud Run and Eventarc, Cloud Run functions brings enhanced infrastructure and broader event coverage to Cloud Run functions, including:
- Built on Cloud Run: Functions are built with Cloud Build and deployed as Cloud Run services. This gives you the ability to customize your function as you would a Cloud Run service. Refer to Cloud Run documentation to explore options for configuring your service, such as memory limits, environment variables, and so forth.
- Longer request processing times: Run longer-request workloads such as processing large streams of data from Cloud Storage or BigQuery.
- Larger instance sizes: Run larger in-memory, compute-intensive, and parallel workloads.
- Improved concurrency: Handle multiple concurrent requests with a single function instance to minimize cold starts and improve latency.
- Traffic management: Split traffic between different function revisions or roll a function back to a prior version.
- Eventarc integration: Native support for Eventarc triggers, bringing all 90+ event sources supported by Eventarc to Cloud Run functions.
- Broader CloudEvents support: Support for industry-standard CloudEvents in all language runtimes, providing a consistent developer experience.
See the comparison table for details.
Because Cloud Run functions deploys functions as services on Cloud Run, Cloud Run functions shares resource quotas and limits with Cloud Run. See Quotas for more information.
Comparison table
Feature | Cloud Run functions (1st gen) | Cloud Run functions |
---|---|---|
Image registry | Container Registry or Artifact Registry | Artifact Registry only |
Request timeout | Up to 9 minutes |
|
Instance size | Up to 8GB RAM with 2 vCPU | Up to 16GiB RAM with 4 vCPU |
Concurrency | 1 concurrent request per function instance | Up to 1000 concurrent requests per function instance |
Traffic splitting | Not supported | Supported |
Event types | Direct support for events from 7 sources | Support for any event type supported by Eventarc, including 90+ event sources via Cloud Audit Logs |
CloudEvents | Supported only in Ruby, .NET, and PHP runtimes | Supported in all language runtimes |
Pricing
For pricing information, see Cloud Run functions pricing.
If you use Cloud Run functions, you can view your costs associated with only Cloud Run functions as follows:
- Go to the Cloud Billing Reports page in the Google Cloud console.
- If prompted, select the billing account associated with your Google Cloud project.
- In the Filters panel, under Labels,
add a label filter with the key
goog-managed-by
and the valuecloudfunctions
.
Next steps
- Learn about the Cloud Run functions execution environment.
- Learn about supported Cloud Run functions triggers.
- See information about Cloud Run functions locations and pricing.