Awkrd1_7470
Feb 23, 2012Nimbostratus
Unable to identify HTTP header variable for pool redirection
I have a two tier load balancing scenario where my client is accessing a load balanced SOA environment which I'll call my "upper load balance tier". The upper load balance tier accesses a VIP on the "lower load balance tier" where we load balance between two shopping sites. I need to provide a method for the client to return to the same data center. Since this is web content I don't have an application to insert a session id, or any other unique identifier so I can provide "persistence".The application team decided to insert a header "datacenter" with a variable "01" or "02" for datacenter identification and "persistence". I've verified the header "datacenter" exist in the subsequent request from the client but I can't get the i-Rule to identify the header, responds with an error. Please look at the rule and see what I have overlooked. Thanks!
when HTTP_RESPONSE{
if { [HTTP::header "datacenter"] equals "01" } {
log local0. "datacenter is $HTTP::header value"
pool DATACENTER-01
} elseif { [HTTP::header "datacenter"] equals "02" } {
log local0. "datacenter is $HTTP::header value"
pool DATACENTER-02
} else {
pool DATACENTER01-02
}
}
Error response: Feb 23 13:19:33 tmm tmm[1867]: 01220001:3: TCL error: PROD-ITA-9045-SELECT-POOL-ON-HTTP-HOST-HEADER-VALUE-20 - can't read "HTTP::header": no such variable while executing "log local0. "datacenter is $HTTP::header"" Thanks!