Google Professional Cloud Developer Question 289
Select 3Google Cloud PlatformYou are developing an e-commerce application hosted on Google Cloud that is expected to experience high traffic during a promotional campaign. Before the campaign starts, you want to perform load testing to ensure the application can handle the expected traffic. Which of the following actions should you take to perform effective load testing on Google Cloud?
- A
Use Cloud Monitoring to measure key metrics such as latency and error rates during the test.
- B
Deploy a load testing tool, such as Apache JMeter or Locust, on Google Kubernetes Engine (GKE) to simulate traffic.
- C
Directly run the load testing tool from your local machine to simulate traffic for the application.
- D
Set up autoscaling policies on your Compute Engine instances or GKE cluster before running the load test.
- E
Perform load testing in the production environment during peak user hours to get accurate results.
Show answer and explanation
Correct answers: A, B, D
Explanation
Effective load testing in Google Cloud requires a combination of proper traffic simulation tools, monitoring solutions to measure performance metrics, and autoscaling configurations to mimic real-world traffic. Running the load test locally or in production during peak hours is either impractical or risky. Following best practices ensures that your application can handle expected loads during high-traffic events like promotional campaigns.
- A. Correct.
Using Cloud Monitoring is essential to measure the application's performance during the load test, helping you identify bottlenecks and critical metrics such as latency, error rates, and resource usage.
- B. Correct.
Deploying a load testing tool such as Apache JMeter or Locust on GKE is a scalable approach to simulate realistic traffic patterns for your application on Google Cloud.
- C. Incorrect.
Running the load testing tool from your local machine is not recommended as it does not provide sufficient scalability or simulate real-world traffic patterns effectively.
- D. Correct.
Setting up autoscaling policies is crucial to ensure your application infrastructure can scale dynamically during the load test, mimicking real-world conditions.
- E. Incorrect.
Performing load testing in the production environment during peak hours is risky and could disrupt real user traffic. It is best to test in a separate staging or test environment that mirrors production.