PROFESSIONAL-CLOUD-DEVELOPER · Question #168
PROFESSIONAL-CLOUD-DEVELOPER Question #168: Real Exam Question with Answer & Explanation
The correct answer is B: Package application configuration and static data into the application image during build time.. https://cloud.google.com/blog/topics/developers-practitioners/3-ways-optimize-cloud-run- Instead of computing things upon startup, compute them lazily. The initialization of global variables always occurs during startup, which increases cold start time. Use lazy initialization fo
Question
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?
Options
- ARead application configuration and static data from the database on application startup.
- BPackage application configuration and static data into the application image during build time.
- CPerform as much work as possible in the background after the response has been returned to the
- DEnsure that timeout exceptions and errors cause the Cloud Run instance to exit quickly so a
Explanation
https://cloud.google.com/blog/topics/developers-practitioners/3-ways-optimize-cloud-run- Instead of computing things upon startup, compute them lazily. The initialization of global variables always occurs during startup, which increases cold start time. Use lazy initialization for infrequently used objects to defer the time cost and decrease cold start times.
Topics
Community Discussion
No community discussion yet for this question.