Forum Discussion
Festus_50639
Aug 20, 2009Nimbostratus
The previous rule and its associated data class list have undergone some transformations.
We now have a simplified data class list using only the service name. I will provide an example below using the actual class name and dummy content.
esb_svcname_class {
"service1"
"service2"
"service3"
"service4"
}
In addition to streamlining the class, the logic determining whether both services on the same server are up was replaced by putting two health monitors on each pool and requiring that all health monitors be successful in order for a node to be considered "up".
The current rule is as follows. However, the requests are being sent to the VIP port rather than the appropriate port for the specific pool.
when HTTP_REQUEST {
log local0. "==ESB URI requested is [HTTP::uri]=="
set svc_uri [string tolower [getfield [HTTP::uri] ? 1]]
set svc_name [getfield $svc_uri "eproxy/service/" 2]
set front "esb_"
set back "_pool"
set svc_pool [concat $front$svc_name$back]
log local0. "--Service name is $svc_name--"
log local0. "--Service pool is $svc_pool--"
if { [ matchclass $::esb_svcname_class contains $svc_name] } {
pool $svc_pool
log local0. "--Request sent to $svc_pool--"
} else {
pool esb_policyagent_pool
log local0. "==ESB Service $svc_name was not defined. Policy Agent pool selected=="
}
}
Am I missing an eval or LB::select to make sure I'm sending the traffic to the port on the selected pool member instead of the VIP port?
Thanks,
Kevin