If the VS didn't have a default pool and a request didn't match any condition which specified a pool, the connection would be dropped. You could handle this by setting a pool in the iRule for all conditions. You can use return to avoid hitting the default pool selection in the iRule:
when CLIENT_ACCEPTED {
Check client IP against the white list once per TCP connection
if {[matchclass [IP::client_addr] equals whitelist]}{
set check_uri 1
} else {
set check_uri 0
}
}
when HTTP_REQUEST {
Check the URI if the client IP was in the whitelist or if the True-Client-IP header is
if { $check_uri or ([HTTP::header "True-Client-IP"] ne "" and [matchclass [HTTP::header "True-Client-IP"] equals whitelist)}{
Check the requested URI
switch -glob [HTTP::uri] {
"*1A1*" { pool 1A1; return }
"*1A2*" { pool 1A2; return }
}
}
If we haven't exited the event already, select a default pool
pool default_pool
}
Aaron