Overview: Cloud Functions (2nd gen)

Cloud Functions (2nd gen) is Google Cloud's next-generation Functions-as-a-Service offering. This new version of Cloud Functions comes with an advanced feature set, giving you more powerful infrastructure, advanced control over performance and scalability, more control around the functions runtime, and triggers from over 90 event sources. Further, the offering is powered by Google Cloud's cutting-edge serverless and eventing infrastructure, Cloud Run and Eventarc.

What's New?

This new version of Cloud Functions provides an enhanced FaaS experience powered by Cloud Run, Cloud Build, Artifact Registry and Eventarc.

Enhanced Infrastructure

  • Longer request processing: Run HTTP functions for up to 60 minutes, making it easier to run longer-request workloads such as processing large streams of data from Cloud Storage or BigQuery. For event-triggered functions, the maximum timeout is 10 minutes.

  • Larger instances: Take advantage of up to 16GB of RAM and 4 vCPUs on Cloud Functions allowing larger in-memory, compute-intensive and more parallel workloads.

  • Concurrency: Process up to 1000 concurrent requests with a single function instance, minimizing cold starts and improving latency when scaling. For preview, this will only be supported by .NET, Java, Node.js, and Go runtimes, for functions with 1 or more vCPUs. For details, see Concurrency.

  • Minimum instances: Provide for pre-warmed instances to minimize cold starts and make sure the bootstrap time of your application does not impact the application performance. See Using minimum instances for details.

  • Traffic management: Cloud Functions (2nd gen) allows multiple revisions of your functions, which lets you split traffic between different revisions and roll a function back to a prior version. See Configuration settings for details.

Broader Event coverage and CloudEvents support

  • Eventarc Integration: Cloud Functions (2nd gen) now includes native support for Eventarc, which brings over 90+ event sources using Cloud Audit logs (BigQuery, Cloud SQL, Cloud Storage, and so on), and Cloud Functions continues to support events from custom sources by publishing to Cloud Pub/Sub directly.

  • CloudEvent format: All languages now support industry standard CloudEvents, regardless of the source, to ensure a consistent developer experience. The payloads are sent via a structured CloudEvent with a cloudevent.data payload.

Preview Limitations

During preview, Cloud Functions (2nd gen) has the following constraints:

  • Cloud Functions (2nd gen) offers Pub/Sub, Cloud Storage and Audit Log events through Eventarc. Additional events for Firestore, Firebase RTDB, Analytics, and Auth are planned.

  • Deploying from Cloud Source Repositories is not currently supported in Cloud Functions (2nd gen).

Regions

Cloud Functions (2nd gen) is available in the following regions (with more regions coming soon):

  • asia-northeast1
  • europe-north1
  • europe-west1
  • europe-west4
  • us-central1
  • us-east1
  • us-west1

See Cloud Run locations for information on which pricing tier each of these regions is in.

Pricing

See Cloud Functions Pricing for details about Cloud Functions (2nd gen) pricing.

To view your costs associated with Cloud Functions (2nd gen), you can filter your billing reports on the goog-managed-by label with the value cloudfunctions.

Support

We encourage you to join the Cloud Functions Beta Tester group, a forum for providing feedback and asking technical questions about Cloud Functions.

See Getting Support for more general support issues.

What's next