
Answer-first summary for fast verification
Answer: Package application configuration and static data into the application image during build time.
The slow response during traffic spikes is likely due to increased cold start times when Cloud Run scales out. To minimize cold starts, the application's startup time must be reduced. Option B suggests packaging configuration and static data into the image during build time, eliminating external dependencies during startup. This reduces initialization latency, allowing new instances to start faster during scaling. Option D ensures faulty instances exit quickly, enabling faster replacement, which indirectly improves reliability during scaling. However, the primary solution to address slow responses during traffic spikes is optimizing startup time via B. Options A (reading from DB on startup) and C (background processing) would increase startup latency or are unreliable in Cloud Run's stateless model.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
How can you improve the performance of your Cloud Run-hosted website during traffic spikes to ensure a better user experience?
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.
No comments yet.