Create four pools, designating one of your servers as priority in each, cascading down respectively:
pool1 pool2 pool3 pool4
1.1.1.1:80 pri 40 1.1.1.2:80 pri 40 1.1.1.3:80 pri 40 1.1.1.4:80 pri 40
1.1.1.2:80 pri 30 1.1.1.3:80 pri 30 1.1.1.4:80 pri 30 1.1.1.1:80 pri 30
1.1.1.3:80 pri 20 1.1.1.4:80 pri 20 1.1.1.1:80 pri 20 1.1.1.2:80 pri 20
1.1.1.4:80 pri 10 1.1.1.1:80 pri 10 1.1.1.2:80 pri 10 1.1.1.3:80 pri 10
Then, it's a simple irule:
when CLIENT_ACCEPTED {
switch [IP::remote_addr] {
"src_ip_S1" { pool pool1 }
"src_ip_S2" { pool pool2 }
"src_ip_S3" { pool pool3 }
"src_ip_S4" { pool pool4 }
default { pool default }
}
}
Makes sure your servers will always go to the right member as long as it's up, but will survive outages as well. HTH...Jason