Topic 1 Question 278
Your web application is hosted on Cloud Run and needs to query a Cloud SQL database. Every morning during a traffic spike, you notice API quota errors in Cloud SQL logs. The project has already reached the maximum API quota. You want to make a configuration change to mitigate the issue. What should you do?
Modify the minimum number of Cloud Run instances.
Use traffic splitting.
Modify the maximum number of Cloud Run instances.
Set a minimum concurrent requests environment variable for the application.
ユーザの投票
コメント(6)
- 正解だと思う選択肢: A
Here's why A is the most effective solution to mitigate API quota errors during traffic spikes:
Cold Starts and API Calls: Cloud Run services scale to zero when not in use. When a new request arrives, a new instance is spun up, leading to a cold start. During this cold start, multiple API calls might be made to initialize the application and connect to the Cloud SQL database. If there's a sudden spike in traffic, a large number of cold starts can occur simultaneously, exceeding the Cloud SQL API quota.
Minimum Instances: By setting a minimum number of Cloud Run instances, you can ensure that a few instances are always running, even during periods of low traffic. This eliminates cold starts during traffic spikes and reduces the number of concurrent API calls made to Cloud SQL, helping you stay within the quota limits.
👍 15RuchiMishra2024/07/16 - 正解だと思う選択肢: A
There has been a previous question relating to this issue which is caused by Cold Starts (RuchiMishra explains this). Solving the issue would be by configuring a minimum number of instances always running
👍 5flummoxed_individual2024/07/24 - 正解だと思う選択肢: A
As explained by RuchiMishra, we need to keep a minimum number of instances always running.
👍 4user6362024/07/21
シャッフルモード