To prevent uncontrolled scaling, resource exhaustion, and unexpected costs, ensure that your Google Cloud Functions are configured with an optimal maximum number of allocated instances. Before running this conformity rule, you must define the maximum number of function instances in the rule settings, in your Trend Micro Cloud One™ – Conformity account.
optimisation
excellence
You can control your function's scaling behavior by setting a maximum number of function instances. This limits costs and prevents overwhelming downstream resources with traffic. Google Cloud functions scale by creating new instances to handle requests. Each instance can process only one request at a time, so large traffic spikes can lead to many new instances. Setting an optimal maximum number of instances ensures efficient resource utilization and timely response to incoming requests, balancing cost and performance.
Audit
To determine if your Google Cloud functions are configured with a maximum number of instances, perform the following operations:
Remediation / Resolution
To ensure that your Google Cloud Functions have an optimal number of instances configured, set the maximum number of function instances by following these steps:
References
- Google Cloud Platform (GCP) Documentation
- Configure Cloud Run functions
- Configure maximum instances
- Concurrency
- GCP Command Line Interface (CLI) Documentation
- gcloud projects list
- gcloud functions list
- gcloud functions describe
- gcloud functions deploy