Google Cloud Professional Cloud Developer — Question 142

You work for an organization that manages an ecommerce site. Your application is deployed behind a global HTTP(S) load balancer. You need to test a new product recommendation algorithm. You plan to use A/B testing to determine the new algorithm’s effect on sales in a randomized way. How should you test this feature?

Answer options

Correct answer: A

Explanation

The correct answer is A, as splitting traffic between different versions using weights allows you to effectively compare the performance of the new algorithm against the existing one in a controlled manner. Option B is insufficient since enabling the feature on a single instance does not provide a comprehensive test across a broader audience. Option C is not a true A/B test as it merely mirrors traffic without distributing it for comparison. Option D, using HTTP header-based routing, does not directly facilitate the randomization needed for A/B testing.