Forum Discussion
hooleylist
Apr 14, 2009Cirrostratus
You can get the default pool configured on the VIP using LB::server pool. You'll want to do this before the pool has been selected on the TCP connection, so run LB::server in CLIENT_ACCEPTED:
when CLIENT_ACCEPTED {
Save the name of the default pool
set default_pool [LB::server pool]
}
when HTTP_REQUEST {
if { [matchclass [string tolower [HTTP::header User-Agent]] contains $::bots] } {
pool p_PUB_botfarm
} else {
pool $default_pool
}
}
Denny, I don't think removing the else clause will have the desired result. I don't think a second HTTP request on the existing HTTP connection from a non-bots request would go to the default pool. In general, it's a good practice to explicitly specify a pool for all cases if you do it for any case.
Aaron