Google Professional Cloud Developer Question 283
Select 3Google Cloud PlatformYou are developing a cloud-based e-commerce application hosted on Google Kubernetes Engine (GKE). To ensure the application can handle high traffic during seasonal sales, you decide to perform performance testing. Which actions should you take to effectively conduct this performance test?
- A
Simulate realistic user traffic patterns using a load testing tool like Locust or JMeter.
- B
Directly test the production environment without any prior preparation to observe real-world behavior.
- C
Set up metrics and logs using Google Cloud Monitoring and Logging for performance analysis.
- D
Manually generate traffic from a single machine to simplify the testing process.
- E
Test your application in a pre-production environment with similar configurations to production.
Show answer and explanation
Correct answers: A, C, E
Explanation
Effective performance testing involves realistic traffic simulation, metric and log monitoring, and testing in an environment that closely mirrors production. These practices help in identifying and addressing potential performance bottlenecks while minimizing risks to the production system.
- A. Correct.
Simulating realistic user traffic patterns using a load testing tool ensures the test accurately reflects real-world scenarios. This helps identify performance bottlenecks effectively.
- B. Incorrect.
Testing directly in production without preparation is risky and could lead to service disruption for actual users. It is not a best practice for performance testing.
- C. Correct.
Setting up metrics and logs using Google Cloud Monitoring and Logging is essential for tracking the application's behavior during the test, identifying issues, and analyzing performance trends.
- D. Incorrect.
Manually generating traffic from a single machine does not accurately simulate distributed user traffic and may lead to incorrect performance conclusions.
- E. Correct.
Testing in a pre-production environment with similar configurations to production ensures the test results are relevant and minimizes risks to the live application.