Hi!




I seem to have run into the same (or at least similar) problem as reported by 
Vladimir Mihailenco a little while ago.



I'm running HAProxy v1.7.2 and my backend server is etcd v2.3.7. The client 
application is using HTTP/1.0 and I have compression enabled in HAProxy. With 
this configuration everything worked fine with HAProxy v1.6.10, but after 
upgrading to v1.7 the response is almost always cut off at about 4KB (let's say 
roughly 9 times out of 10, but it seems to be completely random).



If I switch the client to using HTTP/1.1 or comment out the compression lines 
in HAProxy config, then everything is fine again.



I'm able to reproduce this problem in a test environment with curl as the 
client and minimal HAProxy config:

global

        chroot /var/lib/haproxy

        stats socket /run/haproxy/admin.sock mode 660 level admin

        stats timeout 30s

        user haproxy

        group haproxy

        daemon

defaults

        mode    http

        timeout connect 5000

        timeout client  50000

        timeout server  50000

        compression algo gzip

        compression type application/json

listen etcd

        bind :80

        server etcd1 127.0.0.1:2379



Here's a test with a partial response via HAProxy v1.7:

$ curl -0 -v -o /tmp/output http://localhost/v2/keys/test

> GET /v2/keys/test HTTP/1.0

> User-Agent: curl/7.38.0

> Host: localhost

> Accept: */*

>

* HTTP 1.0, assume close after body

< HTTP/1.0 200 OK

< Content-Type: application/json

< X-Etcd-Cluster-Id: 7e27652122e8b2ae

< X-Etcd-Index: 4

< X-Raft-Index: 22031

< X-Raft-Term: 2

< Date: Fri, 03 Feb 2017 13:10:43 GMT

<

{ [data not shown]

100  3917    0  3917    0     0   767k      0 --:--:-- --:--:-- --:--:--  956k



And a few tries later the same command gives a full response:

$ curl -0 -v -o /tmp/output http://localhost/v2/keys/test

> GET /v2/keys/test HTTP/1.0

> User-Agent: curl/7.38.0

> Host: localhost

> Accept: */*

>

* HTTP 1.0, assume close after body

< HTTP/1.0 200 OK

< Content-Type: application/json

< X-Etcd-Cluster-Id: 7e27652122e8b2ae

< X-Etcd-Index: 4

< X-Raft-Index: 22174

< X-Raft-Term: 2

< Date: Fri, 03 Feb 2017 13:11:55 GMT

<

{ [data not shown]

100  9381    0  9381    0     0  1733k      0 --:--:-- --:--:-- --:--:-- 1832k



The only difference seems to be the number of bytes in the response body.



And if I send the request to etcd directly:

$ curl -0 -v -o /tmp/output http://localhost:2379/v2/keys/test

> GET /v2/keys/test HTTP/1.0


> User-Agent: curl/7.38.0


> Host: localhost:2379

> Accept: */*

>

* HTTP 1.0, assume close after body

< HTTP/1.0 200 OK

< Content-Type: application/json

< X-Etcd-Cluster-Id: 7e27652122e8b2ae

< X-Etcd-Index: 4

< X-Raft-Index: 23406

< X-Raft-Term: 2

< Date: Fri, 03 Feb 2017 13:22:11 GMT

<

{ [data not shown]

100  9381    0  9381    0     0  1878k      0 --:--:-- --:--:-- --:--:-- 2290k



I'll be happy to provide any additional details if needed.





-- 

Kristjan








Reply via email to