Cory you have a good example, but using a global variable will disable CMP for that virtual server and it will only run on the first tmm.
https://devcentral.f5.com/wiki/irules.cmp.ashx
Here's an example using a psuedo random number to select between the four URLs:
Based on https://devcentral.f5.com/wiki/iRules.ratio_load_balancing_using_rand_function.ashx
when HTTP_REQUEST {
Save a psuedo-random number between 0 and 1
set rand [expr { rand() }]
if { $rand < .25 } {
HTTP::redirect "http://www.1.com"
} elseif { $rand < .50 } {
HTTP::redirect "http://www.2.com"
} elseif { $rand < .75 } {
HTTP::redirect "http://www.3.com"
} else {
HTTP::redirect "http://www.4.com"
}
}
Aaron