Riaz_125436
Oct 22, 2014Nimbostratus
Understanding this iRule - to resolve upto 15 seconds lag while playing videos
Hi,
I need help in understanding the iRule below. I am also mentioning the VS setting for clarity.
virtual vs_cdms_http {
snat automap
pool pool_cdms_http
destination 10.0.2.10:http
ip protocol tcp
rules ir_cdms_http
persist pr_dms_source_addr
profiles {
http {}
tcp {}
}
}
rule ir_cdms_http {
when HTTP_REQUEST {
SET DEBUG TO 1 TO TURN ON AND 0 TO TURN OFF
set DEBUG 0
set defaultURI "/windows/test.txt"
if { $DEBUG } { log local0. "DMS URI: [HTTP::uri]" }
switch -glob [HTTP::uri] {
"/" { set uri $defaultURI }
default { set uri [string tolower [HTTP::uri] ] }
}
}
when HTTP_RESPONSE {
set pserver [persist lookup source_addr [IP::client_addr] node]
if { $DEBUG } { log local0. "DEBUG LINE TURN OFF IN PROD URI $uri PServer $pserver:Client Ip [IP::client_addr]:Active Members [active_members [LB::server pool]]" }
switch -glob $pserver {
10.0.0.1 { HTTP::redirect "http://abc001$uri"}
10.0.0.2 { HTTP::redirect "http://abc002$uri"}
default { HTTP::redirect "http://$pserver$uri" }
}
}
}
May I know, how this iRule will be effecting/processing the traffic?
Your help will be kindly appreciated.