Today we noticed something strange after updating our HAProxy to 1.7.9. A
request which took a mere second before now takes a whopping 45 seconds.

After some playing around, we found that if we turned off the compression
on HAProxy it was back to fast again.

We are running HA-Proxy version 1.7.9-1ppa1~trusty 2017/08/19 on Ubuntu
14.04.

Our compression configuration:

compression algo gzip
compression type text/html text/plain text/css image/svg+xml text/xml
application/xml application/javascript application/json application/pdf

Without compression:

$ curl --user user:pass https://host/path/to/pdf -o /tmp/pdf -D headers -H
"Accept-Encoding: gzip"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time
 Current
                                 Dload  Upload   Total   Spent    Left
 Speed
100  137k    0  137k    0     0  64537      0 --:--:--  0:00:02 --:--:--
65102

$ cat headers
HTTP/1.1 200 OK
X-Powered-By: Undertow/1
X-Powered-By: Undertow/1
Set-Cookie: JSESSIONID=sessionid; path=/; HttpOnly; Max-Age=36000;
Expires=Thu, 31-Aug-2017 22:10:49 GMT
Set-Cookie:
access_token=eyJjdHkiOiJKV1QiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiZGlyIn0..v5kb6ns9zt7F0_3F.fPNbj9CWN9gfpCHR8--tfse2xEKDEM22hsSUCIF0KNRTq9pjd3Tl84fAl_tN9rO66ScYaoIMwvgeb89sGV_mYoTG1myJvbVF26RXXTToa3oOCTL9LzqD9pbAa08CSUSS7YEhP5ia7XawX5G2uWqM9qk6nxet-ESDtAN9HRTKeX9UlPwMHcD7Kkow76F2btlZyxoelO0xqnuTt9C1r0_uVxWhOPdcbmdJLB_UrJr6IQpLPsSPf7TgAZVdDwVo7imm8O4eTIModtuVllXEq3dAk5PF5SHhg8W1iFl5Pw.3ssYrnKKFRiZNeP0g9baZQ;
path=/; Max-Age=36000; Expires=Thu, 31-Aug-2017 22:10:49 GMT
Access-Control-Allow-Headers: origin, content-type, accept, authorization
Server: WildFly/10
Server: WildFly/10
Content-Disposition: inline; filename=OBE_11_Bodegraven -
Woerden_000200804_O.pdf
Date: Thu, 31 Aug 2017 12:10:49 GMT
Connection: close
Access-Control-Allow-Origin: *
Vary: Accept
Access-Control-Allow-Credentials: true
Content-Type: application/pdf
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS, HEAD
Access-Control-Max-Age: 1209600
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload;

With compression:

$ curl --user nick.user:pass https://host/path/to/pdf -o /tmp/pdf -D
headers -H "Accept-Encoding: gzip"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time
 Current
                                 Dload  Upload   Total   Spent    Left
 Speed
100  137k    0  137k    0     0   3078      0 --:--:--  0:00:45 --:--:--
39398
$ cat headers
HTTP/1.1 200 OK
X-Powered-By: Undertow/1
X-Powered-By: Undertow/1
Set-Cookie: JSESSIONID=sessionid; path=/raildocs; HttpOnly; Max-Age=36000;
Expires=Thu, 31-Aug-2017 22:12:24 GMT
Set-Cookie:
access_token=eyJjdHkiOiJKV1QiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiZGlyIn0..RcxVSV-cJB7rTq6N.JupirTzLtU6KhCmswAiejWvC13pVciJ01br_XRoMvhlXk3j7db3hshhh7eo5OjgOkUgNxyGplE3ohvC8xXCYSUKAfcCeYYe3_9VCY28eLoJ0TgO63uzLwI77kgek2Qd1dVMAWl-y3B9sWt33irlBPaJLUaT2GEG53EQ1hrqyLD8mGHzw5qRZhDrCFCWxJbvHVQvnXn9btkcxFGHBIlfC887UShTR05WywXo31fNJGDJa6R9a0dbe1hr5mp-O30dpTezRrfmrrbK8NILHmcJBEQiYhjUXk6rRk9LIsA.I6oBuk3Gw4h41C0D9hz52A;
path=/; Max-Age=36000; Expires=Thu, 31-Aug-2017 22:12:24 GMT
Access-Control-Allow-Headers: origin, content-type, accept, authorization
Server: WildFly/10
Server: WildFly/10
Content-Disposition: inline; filename=OBE_11_Bodegraven -
Woerden_000200804_O.pdf
Date: Thu, 31 Aug 2017 12:12:24 GMT
Connection: close
Access-Control-Allow-Origin: *
Vary: Accept
Access-Control-Allow-Credentials: true
Content-Type: application/pdf
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS, HEAD
Access-Control-Max-Age: 1209600
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload;

Does someone has an idea why we see this degrade in performance. What are
we doing wrong?

Thanks in advance,

Nick Stolwijk

~~~ Try to leave this world a little better than you found it and, when
your turn comes to die, you can die happy in feeling that at any rate you
have not wasted your time but have done your best ~~~

Lord Baden-Powell

Reply via email to