QuestionQ160

Designing scalable, available, and reliable cloud-native applications

Users report that your website hosted on Cloud Run responds too slowly during traffic spikes. You want to deliver a better user experience at traffic peaks. What should you do?

  • 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.
Explanation

Cloud Run can create new instances as traffic increases, and requests can wait while those instances start. Keeping immutable application configuration and static data in the application image avoids database access during startup, reducing startup-path latency. Cloud Run guidance also advises handling exceptions rather than crashing instances, because replacement startup can delay queued traffic.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!