The environment I tested the even in had the request incoming on Port 80, with Port Translation enabled.
I executed the following iRule and only received a response in the HTTP_REQUEST Event. A Load Balancing decision would have had to have been made in order to determine what the server Destination Port would have been.
when CLIENT_ACCEPTED {
if { [LB::server port] equals "8181" } {
log local0. "Client Accepted Event: LB Selected Server: [LB::server] / Selected Port: [LB::server port]"
}
}
when HTTP_REQUEST {
if { [LB::server port] equals "8181" } {
log local0. "HTTP Request Event: LB Selected Server: [LB::server] / Selected Port: [LB::server port]"
}
}
I believe that the LB Decision would have had to have already been made in order for this to function properly.
"This command allows you to query for information about the member selected after a load balancing decision has been made."
Sanitized Test Output:
Sep 28 12:06:52 local/tmm1 info tmm1[5062]: Rule Z.iRule.Development : HTTP Request Event: LB Selected Server: pool.test.pool.name 10.xxx.xxx.xxx 8181 / Selected Port: 8181