PROFESSIONAL-CLOUD-DEVELOPER · Question #240
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 us
The correct answer is A. Split traffic between versions using weights.. Traffic splitting by weight is the standard mechanism for A/B testing in Cloud Run or behind a load balancer. By assigning a percentage of traffic (e.g., 50%) to the new recommendation algorithm version and the remainder to the existing version, users are randomly routed to eithe
Question
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?
Options
- ASplit traffic between versions using weights.
- BEnable the new recommendation feature flag on a single instance.
- CMirror traffic to the new version of your application.
- DUse HTTP header-based routing.
How the community answered
(30 responses)- A77% (23)
- B7% (2)
- C13% (4)
- D3% (1)
Explanation
Traffic splitting by weight is the standard mechanism for A/B testing in Cloud Run or behind a load balancer. By assigning a percentage of traffic (e.g., 50%) to the new recommendation algorithm version and the remainder to the existing version, users are randomly routed to either version, allowing you to statistically compare sales outcomes. This is randomized by nature since routing is determined by the load balancer without bias. Option B (feature flag on a single instance) is not randomized and only affects a subset of a single instance. Option C (traffic mirroring) sends a copy of traffic to the new version but the mirrored traffic does not serve real responses, so it cannot measure sales impact. Option D (HTTP header-based routing) targets specific users based on request headers, which is not random.
Topics
Community Discussion
No community discussion yet for this question.