Google Cloud Professional Cloud Developer — Question 155
Users are complaining that your Cloud Run-hosted website responds too slowly during traffic spikes. You want to provide a better user experience during traffic peaks. What should you do?
Answer options
- A. Read application configuration and static data from the database on application startup.
- B. Package application configuration and static data into the application image during build time.
- C. Perform as much work as possible in the background after the response has been returned to the user.
- D. Ensure that timeout exceptions and errors cause the Cloud Run instance to exit quickly so a replacement instance can be started.
Correct answer: B
Explanation
Option B is correct because packaging application configuration and static data into the application image reduces the need for database calls at startup, thus speeding up response times. Options A and C do not address the core issue of performance during traffic spikes, while option D focuses on managing errors rather than improving performance.