Slide 23
Slide 23 text
23
©2019
A/B testing
Select and assign buckets at the edge to cache test variations
8. In VCL_RECV, add a second bucket assignment:
set var.testKey = req.http.ab "buttonSize";
set var.userTestSlot = fastly.hash(var.testKey, 0, 1, 100);
set req.http.ab-buttonSize =
if (var.userTestSlot <= 20, "small",
if (var.userTestSlot <= 30, "medium",
"large"
));