Maria_Ramirez_5
Feb 09, 2007Nimbostratus
weblogic persistenca does not works
Good morning,
I have a problem with iRules.
I have a pool with two weblogic servers. I want to maintain persistence based on cookies.
I create a virtual server for the pool of the two weblogic servers and I associate the iRules to the virtual server. But the persistence does not work. The traffic is always loadbalanced between the two nodes. Please can you help me? The iRules are:
* Servidor Web
when HTTP_REQUEST {
if { [HTTP::cookie exists WEBSRV] } {
persist uie [HTTP::cookie WEBSRV];
}
}
when HTTP_RESPONSE {
if { not [HTTP::cookie exists WEBSRV ] } {
set ip_srv [IP::server_addr];
set valor [ string range $ip_srv [ expr [string last . $ip_srv ] + 1] 15];
set val_cookie "WEBSRV=$valor; path=/"
HTTP::header insert Set-Cookie $val_cookie;
persist add uie $valor;
}
}
* Weblogic
when HTTP_REQUEST {
if { [HTTP::cookie exists WLSRV] } {
persist uie [HTTP::cookie WLSRV];
}
}
when HTTP_RESPONSE {
if { not [HTTP::cookie exists WLSRV ] } {
set ip_srv [IP::server_addr];
set valor [ string range $ip_srv [ expr [string last . $ip_srv ] + 1] 15];
set val_cookie "WLSRV=$valor; path=/"
HTTP::header insert Set-Cookie $val_cookie;
persist add uie $valor;
}
}
Thanks and regards