Forum Discussion
Can you show vs config? Also the curl request/response headers for via the vs and direct to server?
- IheartF5_45022Jan 20, 2017Nacreous
Does your Apache config only have compression configured on one vHost and not the default?
- erikkari_267307Jan 20, 2017Altostratus
Thank you for replying. One important thing I forgot to mention is that our VS in F5 actually calls Varnish (cache server) which then calls Apache. Same deal though: calling Varnish returns compressed data (which is what we want) while calling VS in F5 with the same URI returns un-compressed data.
Below are the details ...
We have 2 Apache servers and both are configured for compression using mod_deflate.
Here's the VS configuration in F5 (taken from the SCF file): ltm virtual /Common/VS_NAME { destination /Common/VS_IP:VS_PORT ip-protocol tcp mask 255.255.255.255 pool /Common/ profiles { /Common/html { } /Common/http { } /Common/tcp { } } source 0.0.0.0/0 source-address-translation { type automap } translate-address enabled translate-port enabled }
Here are request and response headers with curl:
HTTP/1.1 200 OK Date: Fri, 20 Jan 2017 04:14:31 GMT Server: Apache-Coyote/1.1 Content-Type: application/json Vary: Accept-Encoding Content-Length: 4335 Cache-Control: public Last-Modified: Fri, 20 Jan 2017 04:14:31 GMT x-url: URI x-host: VS_IP:VS_PORT X-Varnish: 34381 Age: 0 Via: 1.1 varnish-v4 Access-Control-Allow-Origin: * X-Cache: MISS Accept-Ranges: bytes Connection: Keep-Alive
HTTP/1.1 200 OK Date: Fri, 20 Jan 2017 04:16:04 GMT Server: Apache-Coyote/1.1 Content-Type: application/json Vary: Accept-Encoding Content-Encoding: gzip Cache-Control: public Last-Modified: Fri, 20 Jan 2017 04:16:04 GMT x-url: URI X-Varnish: 34427 Age: 0 Via: 1.1 varnish-v4 Access-Control-Allow-Origin: * X-Cache: MISS Accept-Ranges: bytes Transfer-Encoding: chunked Connection: keep-alive
- IheartF5_45022Jan 20, 2017Nacreous
Just guessing but perhaps the presence of the html profile is causing this. I assume the html profile causes content decompression (as cannot otherwise inspect it). So either remove the html profile, or add an http-compression profile.