0
0
Nginxdevops~10 mins

A/B testing with split_clients in Nginx - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define a variable 'variant' using split_clients.

Nginx
split_clients "$remote_addr" $variant {
    [1];
}
Drag options to blanks, or click blank then click option'
A100% 0%
B10% A; 90% B
C25% A; 75% B
D50% A; 50% B
Attempts:
3 left
💡 Hint
Common Mistakes
Using percentages that do not add up to 100%
Not using semicolons to separate variant assignments
2fill in blank
medium

Complete the code to set a variable 'color' for A/B testing with split_clients.

Nginx
split_clients "$http_user_agent" $color {
    [1];
}
Drag options to blanks, or click blank then click option'
A30% red; 70% blue
B80% orange; 20% purple
C50% black; 50% white
D60% green; 40% yellow
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect syntax without semicolons
Percentages not summing to 100%
3fill in blank
hard

Fix the error in the split_clients block to correctly assign variants.

Nginx
split_clients "$cookie_user" $group {
    [1];
}
Drag options to blanks, or click blank then click option'
A50% groupA; 50% groupB
B50% groupA;50% groupB
C50% groupA, 50% groupB
D50% groupA 50% groupB
Attempts:
3 left
💡 Hint
Common Mistakes
Using commas instead of semicolons
Missing semicolons between assignments
4fill in blank
hard

Fill both blanks to split traffic by IP and assign variants with weights.

Nginx
split_clients "$remote_addr" $test_group {
    [1];
    [2];
}
Drag options to blanks, or click blank then click option'
A20% control
B80% experiment
C50% control
D50% experiment
Attempts:
3 left
💡 Hint
Common Mistakes
Percentages not adding to 100%
Missing semicolons after assignments
5fill in blank
hard

Fill all three blanks to create a split_clients block with three variants.

Nginx
split_clients "$http_cookie" $variant {
    [1];
    [2];
    [3];
}
Drag options to blanks, or click blank then click option'
A10% variantA
B20% variantB
C70% variantC
D50% variantA
Attempts:
3 left
💡 Hint
Common Mistakes
Percentages not summing to 100%
Incorrect syntax without semicolons