Forum Discussion
yves_werniers_1
Jun 09, 2010Nimbostratus
Hello all,
thanks for all the input. What I finally put together:
I created 2 data group lists testin and testout
I linked the default stream profile to my virtual server, as well as the below irule.
when HTTP_RESPONSE {
set listlengte [llength [class get testin]]
set streamexpression ""
foreach {stringin} [class get testin] {stringout} [class get testout]
{
set streamexpression [concat $streamexpression "@[lindex $stringin 1]@[lindex $stringout 1]@"]
}
set streamexpression [string map {"@ @" "@@"} $streamexpression]
STREAM::expression $streamexpression
STREAM::enable
}
All I need to do is to add the part that disabls chunking:
when HTTP_REQUEST {
Don't allow data to be chunked
if {
[HTTP::version] eq "1.1" } {
if { [HTTP::header is_keepalive] } {
HTTP::header replace "Connection" "Keep-Alive"
}
HTTP::version "1.0"
}
}
Is there anyone that can estimate the impact (performance wise) of an iRule like this? I used the foreach instead of the 'heavier' for loop, and I used string map instead of string replace, so I would expect it to be 'as light as possible'. If anyone can think of ways to make it even lighter, please let me know.
Yves