Cloud Functions version comparison
Cloud Functions offers two product versions: Cloud Functions (1st gen), the original version, and Cloud Functions (2nd gen), a new version built on Cloud Run and Eventarc to provide an enhanced feature set. This page describes new features introduced in Cloud Functions (2nd gen) and provides a comparison between the two product versions.
We recommend that you choose Cloud Functions (2nd gen) for new functions wherever possible. However, we plan to continue supporting Cloud Functions (1st gen).
New in Cloud Functions (2nd gen)
Cloud Functions (2nd gen) is Google Cloud's next-generation Functions-as-a-Service offering. Built on Cloud Run and Eventarc, Cloud Functions (2nd gen) brings enhanced infrastructure and broader event coverage to Cloud Functions, including:
- 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 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 Functions (2nd gen) is built on Cloud Run, Cloud Functions (2nd gen) shares resource quotas and limits with Cloud Run. See Quotas for more information.
|Feature||Cloud Functions (1st gen)||Cloud Functions (2nd gen)|
|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|
For pricing information, see Cloud Functions pricing.
If you use Cloud Functions (2nd gen), you can view your costs associated with only Cloud Functions (2nd gen) 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-byand the value
Coming soon in Cloud Functions (2nd gen)
- The ability to deploy functions from Cloud Source Repositories.
- Support for native Cloud Firestore events (row level change triggers) in 2nd gen and Eventarc.
- Support for using capital letters in function names.
- Ability to migrate Cloud Functions (1st gen) functions to (2nd gen) so that customers can take advantage of new features and capabilities.
Currently, function URLs in Cloud Functions (2nd gen) use a non-deterministic format, meaning you cannot predict your function URL before deployment (though the URL remains stable after deployment). In a future release, 2nd gen function URLs will be updated to be both stable and deterministic.
- Learn about the Cloud Functions execution environment.
- Learn about supported Cloud Functions triggers.
- See information about Cloud Functions locations and pricing.