nerdexam
Google

PROFESSIONAL-CLOUD-DEVELOPER · Question #10

You have an application running in App Engine. Your application is instrumented with Stackdriver Trace. The /product-details request reports details about four known unique products at /sku- details a

The correct answer is C. Change /product-details to perform the requests in parallel.. The Stackdriver Trace data shows that /product-details makes four sequential calls to /sku-details - one after another. Since each call fetches an independent product's data, there is no dependency between them, meaning they can be executed in parallel (concurrently). This reduce

Optimizing application performance

Question

You have an application running in App Engine. Your application is instrumented with Stackdriver Trace. The /product-details request reports details about four known unique products at /sku- details as shown below. You want to reduce the time it takes for the request to complete. What should you do?

Exhibit

PROFESSIONAL-CLOUD-DEVELOPER question #10 exhibit

Options

  • AIncrease the size of the instance class.
  • BChange the Persistent Disk type to SSD.
  • CChange /product-details to perform the requests in parallel.
  • DStore the /sku-details information in a database, and replace the webservice call with a database

How the community answered

(29 responses)
  • A
    10% (3)
  • B
    3% (1)
  • C
    79% (23)
  • D
    7% (2)

Explanation

The Stackdriver Trace data shows that /product-details makes four sequential calls to /sku-details - one after another. Since each call fetches an independent product's data, there is no dependency between them, meaning they can be executed in parallel (concurrently). This reduces total latency from the sum of all four round-trip times down to approximately the duration of the single slowest call. Option A (larger instance) adds compute capacity but does not fix the sequential bottleneck. Option B (SSD disk) is irrelevant for web service calls. Option D (database) would require a data migration and does not directly address the latency caused by sequential requests.

Topics

#Performance Optimization#App Engine#Microservices#Concurrency

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVELOPER Practice