Cloud Functions in GCP is a serverless execution environment for building and connecting cloud services. Cloud functions is similar to AWS Lambda and Azure Functions.
With Cloud Functions you can write functions that are triggered when events are emitted from your cloud infrastructure and services. Along with emitted events Cloud functions can be triggered by an HTTP request. Below are the some of the example events that can trigger a Cloud function.
In August, 2022 Google Cloud announced the general availability of the 2nd generation of Cloud Functions. With this announcement now 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. With the general availability of the 2nd generation of Cloud Functions you can start using 2nd gen Cloud Functions for new workloads, while continuing to use your existing 1st gen Cloud Functions.
See Also: How to create 2nd gen Cloud functions
See Also: How to create 1st gen Cloud functions
Cloud Functions (2nd gen) is built on Cloud Run and Eventarc and have an enhanced infrastructure and broader event coverage. Let's have a look the feature comparison between 1st gen and 2nd gen.
Traffic splitting
Learn more about traffic splitting in Cloud Functions: traffic-splitting
Request timeout
Learn more about request timeout in Cloud Functions: timeout
Instance size
Event types
Learn more about event triggers in Cloud Functions: event triggers
Image registry
Concurrency
Learn more about Cloud Functions concurrency: concurrency
CloudEvents
Learn more about CloudEvents: CloudEvents
Category: GCP