Understanding STREAM expression and Compression
Hello - I have a question to try and confirm my understanding around using STREAM and compression.
I'm aware of the need to disable compression so STREAM is able to inspect the payload, but after the STREAM expression has done it's replacing, is or can, the content be compressed to improve performance or is this lost?
In our set-up, we have physical LTMs that handle SSL offloading (part of the cloud solution we use) and virtual LTMs that we configure for service specific iRules etc.
So on the physical LTM with SSL offload, there is STREAM (blank) and iRule to replace http:// with https:// on the response with the following:
when HTTP_REQUEST {
PHYSICAL LTM WITH SSL OFFLOAD
tell server not to compress response
HTTP::header remove Accept-Encoding
disable STREAM for request flow
STREAM::disable
}
when HTTP_RESPONSE {
catch and replace redirect headers
if { [HTTP::header exists Location] } {
HTTP::header replace Location [string map {"http://" "https://"} [HTTP::header Location]]
}
only look at text data
if { [HTTP::header Content-Type] contains "text" } {
create a STREAM expression to replace any http:// with https://
STREAM::expression {@http://@https://@}
enable STREAM
STREAM::enable
}
}
On the virtual LTM, we have a similar entry in the iRule:
when HTTP_REQUEST {
VIRTUAL LTM
tell server not to compress response
HTTP::header remove Accept-Encoding
disable STREAM for request flow
STREAM::disable
}
when HTTP_RESPONSE {
catch and replace redirect headers
if { [HTTP::header exists Location] } {
HTTP::header replace Location [string map {"://internal.url" "://external.url"} [HTTP::header Location]]
}
only look at text data
if { [HTTP::header Content-Type] contains "text" } {
create a STREAM expression to replace any http:// with https://
STREAM::expression {@://internal.url@://external.url@}
enable STREAM
STREAM::enable
}
}
So in this set-up, we we loose the benefit of HTTP compression?
Thanks