Meshal_119384
Jun 29, 2015Nimbostratus
Irule for URI redirection working for first session
Hi all ,
I have write irule to forward the traffic based on uri , but when I test it I found that there every session is create two times one flow the irule and second flow the default , here my irule
when CLIENT_ACCEPTED {
set vip [IP::local_addr]:[TCP::local_port]
}
when HTTP_REQUEST {
if { [HTTP::uri] contains "/abc" } {
log local0. "[IP::client_addr]:[TCP::client_port] [IP::local_addr]:[TCP::local_port]"
pool POOL_1
}
else {
pool POOL_2
log local0. "NOT matched , default POOL [IP::client_addr]:[TCP::client_port] [IP::local_addr]:[TCP::local_port]"
}
}
when SERVER_CONNECTED {
log local0. "Connection from [IP::client_addr]:[TCP::client_port] to VIP $vip To Node [IP::server_addr]:[TCP::server_port] established."
}
and here the logs
1.1.1.1%10:65437 10.10.10.10%10:5291
Connection from 1.1.1.1%10:65437 to VIP 10.10.10.10%10:5291 To Node 10.10.10.20%10:6102 established.
NOT matched , default POOL 1.1.1.1%10:65438 10.10.10.10%10:5291
Connection from 1.1.1.1%10:65438 to VIP 10.10.10.10%10:5291 To Node 10.10.10.20%10:6100 established.