Thanks Igor. With that change, the amount of data transferred mirrors the
gzip output.

Regards,
- KK

On Wed, Apr 8, 2015 at 11:40 AM, Igor Cicimov <
[email protected]> wrote:

>
>
> On Wed, Apr 8, 2015 at 3:47 PM, Krishna Kumar Unnikrishnan (Engineering) <
> [email protected]> wrote:
>
>> Hi all,
>>
>> I am trying to use the compression feature, but don't seem to get it
>> working when
>> trying to curl some text files (16K containing a-zA-Z, also smaller files
>> like 1024
>> bytes):
>>
>> $ curl -o/dev/null -D - "http://192.168.122.110:80/TEXT_16K"; -H
>> "Accept-Encoding: gzip"
>>   % Total    % Received % Xferd  Average Speed   Time    Time     Time
>> Current
>>                                  Dload  Upload   Total   Spent    Left
>> Speed
>>   0     0    0     0    0     0      0      0 --:--:-- --:--:--
>> --:--:--     0HTTP/1.1 200 OK
>> Server: nginx/1.6.2
>> Date: Wed, 08 Apr 2015 05:00:35 GMT
>> *Content-Type: application/octet-stream*
>>                                    ^
>>                                    ^
>>
> Well, compare the Content-Type of the file you are returning with the
> types specified in your config:
>
>
> *compression type text/html text/plain text/javascript
> application/javascript application/xml text/css*
> it is not on the list is it ???
>
> Content-Length: 16384
>> Last-Modified: Wed, 08 Apr 2015 04:45:12 GMT
>> ETag: "5524b258-4000"
>> Accept-Ranges: bytes
>>
>> 100 16384  100 16384    0     0  4274k      0 --:--:-- --:--:-- --:--:--
>> 5333k
>>
>> My configuration file has these parameters:
>>
>> ....
>>         compression algo gzip
>>         *compression type text/html text/plain text/javascript
>> application/javascript application/xml text/css*
>>         server nginx-1 192.168.122.101:80 maxconn 15000 check
>>         server nginx-2 192.168.122.102:80 maxconn 15000 check
>> .....
>> ......
>>
>> Tcpdump at the proxy shows:
>>
>> ........GET /TEXT_16K HTTP/1.1
>> User-Agent: curl/7.26.0
>> Host: 192.168.122.110
>> Accept: */*
>> Accept-Encoding: gzip
>> X-Forwarded-For: 192.168.122.1
>>
>>
>> ........HTTP/1.1 200 OK
>> Server: nginx/1.6.2
>> Date: Wed, 08 Apr 2015 05:25:09 GMT
>> Content-Type: application/octet-stream
>> Content-Length: 16384
>> Last-Modified: Wed, 08 Apr 2015 04:28:01 GMT
>> Connection: keep-alive
>> ETag: "5524ae51-4000"
>> Accept-Ranges: bytes
>>
>> ........HTTP/1.1 200 OK
>> Server: nginx/1.6.2
>> Date: Wed, 08 Apr 2015 05:25:09 GMT
>> Content-Type: application/octet-stream
>> Content-Length: 16384
>> Last-Modified: Wed, 08 Apr 2015 04:28:01 GMT
>> Connection: keep-alive
>> ETag: "5524ae51-4000"
>> Accept-Ranges: bytes
>>
>> haproxy build info:
>> HA-Proxy version 1.5.8 2014/10/31
>> Copyright 2000-2014 Willy Tarreau <[email protected]>
>>
>> Build options :
>>   TARGET  = linux2628
>>   CPU     = generic
>>   CC      = gcc
>>   CFLAGS  = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat
>> -Werror=format-security -D_FORTIFY_SOURCE=2
>>   OPTIONS = USE_ZLIB=1 USE_OPENSSL=1 USE_PCRE=1
>>
>> Default settings :
>>   maxconn = 2000, bufsize = 16384, maxrewrite = 8192, maxpollevents = 200
>>
>> Encrypted password support via crypt(3): yes
>> Built with zlib version : 1.2.7
>> Compression algorithms supported : identity, deflate, gzip
>> Built with OpenSSL version : OpenSSL 1.0.1e 11 Feb 2013
>> Running on OpenSSL version : OpenSSL 1.0.1e 11 Feb 2013
>> OpenSSL library supports TLS extensions : yes
>> OpenSSL library supports SNI : yes
>> OpenSSL library supports prefer-server-ciphers : yes
>> Built with PCRE version : 8.30 2012-02-04
>> PCRE library supports JIT : no (USE_PCRE_JIT not set)
>> Built with transparent proxy support using: IP_TRANSPARENT
>> IPV6_TRANSPARENT IP_FREEBIND
>>
>> Available polling systems :
>>       epoll : pref=300,  test result OK
>>        poll : pref=200,  test result OK
>>      select : pref=150,  test result OK
>> Total: 3 (3 usable), will use epoll.
>>
>> How can I fix this? Thanks for any help,
>>
>> Regards,
>> - KK
>>
>
>
>
> --
> Igor Cicimov | DevOps
>
>
> p. +61 (0) 433 078 728
> e. [email protected] <http://encompasscorporation.com/>
> w*.* encompasscorporation.com
> a. Level 4, 65 York Street, Sydney 2000
>

Reply via email to