rsacheen
Apr 25, 2018Nimbostratus
HTTP::collect performance impact
Does Collecting of HTTP request payload effect the performance of LTM?
Suppose if I collect 10K of data every request. Do I have to take any caution reagrding the performance in the case of iRule mentioned below? Is it necessary to use HTTP::release in my case? I read somewhere that data is implicitly released.Are there any suggestions/advice for the iRule below, so that it runs better performance wise.
when HTTP_REQUEST {
if { [HTTP::host] contains "test-main" } {
pool pool_test-main
return
} elseif { [HTTP::host] contains "test01" } {
pool pool_test01
return
} else {
pool pool_test02
if {[HTTP::uri] contains "web_dummy"} {
collect
HTTP::collect [HTTP::header Content-Length]
}
return
}
}
when HTTP_REQUEST_DATA {
foreach x [split [HTTP::payload] "&"] {
if { $x starts_with "user_ref=" } {
set user_ref [lindex [split $x "="] 1]
if { [matchclass $user_ref equals CX_SERVICE_ID] }{
HTTP::uri [string map {"/web_dummy" "/notify_dummy"} [HTTP::uri]]
pool pool_test00
return
}
}
}
HTTP::release
return
}