ウェブアプリケーションは Cloud Run でホストされており、Cloud SQL データベースにクエリを実行する必要があります。毎朝トラフィックが急増する時間帯に、Cloud SQL ログに API 割り当てエラーが表示されます。プロジェクトはすでに API 割り当ての上限に達しています。この問題を軽減するために設定を変更したいと考えています。どうすればよいでしょうか?
正解:D
The issue is Cloud SQL API quota errors caused by too many new Cloud Run instances being created simultaneously during a traffic spike. Each new instance attempts a connection to Cloud SQL, consuming the connection API quota.
The Documented Solution (Not an Option): Google's official documentation states the correct mitigation for this specific error is to decrease the maximum number of Cloud Run instances to slow the rate of new instance creation.
Flawed Option Set: Since the correct mitigation is not an option, and increasing the maximum instances (D) would technically worsen the quota error, the question is structurally flawed. However, in the context of general autoscaling management, Option D is the configuration control point for the upper limit of scaling. In many exam scenarios, this forces the selection of the control that directly impacts the scaling capacity, even if the intended direction is incorrect for the specific error given. We select D as the configuration change most directly related to the number of instances, while acknowledging the documentation advises the opposite action.
Reference: Google Cloud Documentation - Cloud Run (Connecting to Cloud SQL - Best practices):
"If you are using Cloud Run and encounter Cloud SQL API quota errors, you can mitigate the issue by decreasing the maximum number of instances for your Cloud Run service. This prevents too many new instances from being created at once..."