Cloud Functions version comparison Stay organized with collections Save and categorize content based on your preferences.
There are two versions ofCloud Functions for Firebase:
- Cloud Functions (2nd gen), whichdeploys your functions as services onCloud Run, allowing you totrigger them usingEventarc andPub/Sub.
- Cloud Functions (1st gen), the original version of functionswith limited event triggers and configurability.
We recommend that you chooseCloud Functions (2nd gen) for new functionswherever possible. However, we plan to continue supportingCloud Functions(1st gen).
This page describes features introduced inCloud Functions andprovides a comparison between the two product versions.
Cloud Functions (2nd gen)
Cloud Functions is Firebase's next-generationFunctions-as-a-Service offering. Built onCloud Run andEventarc,Cloud Functions (2nd gen) brings enhancedinfrastructure and broader event coverage toCloud Functions, including:
- Built onCloud Run: Functions are built withCloud Build and deployed asCloud Run services using thedefaultCloud Run execution environment.This gives you the ability to customize your function as you would aCloud Run service. Refer toCloud Run documentation toexplore options for configuring your service, such asmemorylimits,environment variables,and so forth.
- Longer request processing times: Run longer-request workloads such asprocessing large streams of data fromCloud Storage orBigQuery.
- Larger instance sizes: Run larger in-memory, compute-intensive, andparallel workloads.
- Improved concurrency: Handle multiple concurrent requests with a singlefunction instance to minimize cold starts and improve latency.
- Traffic management: Split traffic between different function revisionsor roll a function back to a prior version.
- Eventarc integration: Native support forEventarctriggers, bringing all 90+ event sources supported byEventarc toCloud Functions.
- Broader CloudEvents support: Support for industry-standardCloudEvents in all language runtimes, providinga consistent developer experience.
See thecomparison table for details.
BecauseCloud Functions deploys functions as services onCloud Run,Cloud Functions shares resource quotas and limits withCloud Run. SeeQuotas.
Comparison table
| Feature | Cloud Functions (1st gen) | Cloud Functions |
|---|---|---|
| Image registry | Container Registry orArtifact Registry | Artifact Registry only |
| Request timeout | Up to 9 minutes |
|
| Service account* | Google App Engine service account (PROJECT_ID@ | Google Cloud default compute service account (PROJECT_NUMBER-compute@developer.gserviceaccount.com) |
| 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 |
* This is the default service account used to access Firebase or Cloud APIsfrom a running function. It is used by the Firebase Admin SDK when youinitialize without arguments.
Pricing
For pricing information, seeFirebase pricing plans.
You can view your costs associated withCloud Functions as follows:
- Go to theCloud Billing Reports pagein the Google Cloud console.
- If prompted, select the billing account associated with yourGoogle Cloud project.
- In theFilters panel, underLabels,add a label filter with the key
goog-managed-byand the valuecloudfunctions.
Limitations
Cloud Functions for Firebase (2nd gen) does not provide support forAnalyticsevents.
ThoughCloud Functions for Firebase (2nd gen) supports authentication blockingevents, it does not support the same set of basicAuthentication events as1st gen.
However, because 1st gen and 2nd gen functions can coexist side-by-side in the same source file, you can stilldevelop and deployAnalytics and basicAuthentication triggers in 1st gentogether with 2nd gen functions.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-18 UTC.