QuestionQ141

Building and testing applications

You must load-test a group of REST API endpoints deployed to Cloud Run. The API responds to HTTP POST requests. Your load tests must satisfy these requirements:

  • Load is generated from multiple parallel threads.
  • API user traffic comes from multiple source IP addresses.
  • Load can scale up through additional test instances.

You want to use Google-recommended best practices. How should you configure the load test?

  • A Create an image that has cURL installed, and configure cURL to run a test plan. Deploy the image in a managed instance group, and run one instance of the image for each VM.
  • B Create an image that has cURL installed, and configure cURL to run a test plan. Deploy the image in an unmanaged instance group, and run one instance of the image for each VM.
  • C Deploy a distributed load testing framework on a private Google Kubernetes Engine cluster. Deploy additional Pods as needed to initiate more traffic and support the number of concurrent users.
  • D Download the container image of a distributed load testing framework on Cloud Shell. Sequentially start several instances of the container on Cloud Shell to increase the load on the API.
Explanation

A distributed load-testing framework on GKE can run concurrent test workers in multiple Pods and scale the test generator horizontally by adding Pods. This provides controlled concurrent traffic and multiple load-generator sources. Google Cloud recommends using a controlled test harness, such as JMeter, for Cloud Run load testing and increasing load through thread groups and request timing.

Learn more

Community Discussion

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