Google HTTP Load Balancer and chunked transfer encoding

1,443 views
Skip to first unread message

Michal Witkowski

unread,
Oct 15, 2015, 10:22:05 AM10/15/15
to gce-discussion
We're experimenting with putting a service, which returns HTTP Chunked Transfer encoding (https://en.wikipedia.org/wiki/Chunked_transfer_encoding), behind the Google Cloud GFEs (HTTP Load Balancer).

The normal (that return with "Content-Length" body) endpoints of the same Backend Service work as intended. As such, this doesn't seem to be a healthchecking or a configuration issue on our part.

However, for endpoints that return "Transfer-encoding: chunked", the response is:

HTTP 502 
Error: Server Error

The server encountered a temporary error and could not complete your request.
Please try again in 30 seconds.

Do Google HTTP Load Balancers not support Chunked responses? It'd be weird as the HTTP 1.1 Spec (published in June 1999) states

 All HTTP/1.1 applications MUST be able to receive and decode the
   "chunked" transfer-coding, and MUST ignore chunk-extension extensions
   they do not understand.

Are we missing some configuration option?

Thanks,
Michal
Head of Infrastructure
Improbable

Kamran (Google Cloud Support)

unread,
Oct 16, 2015, 10:41:39 PM10/16/15
to gce-discussion

Hi Michal,

Can you post your HTTP request's header, or an equivalent curl command that can reproduce the issue? I just tested a post request on HTTP load balancer with setting "Transfer-encoding: chunked" and I'm not getting any errors:

$ curl -vvv -H "Transfer-encoding: chunked" --data "param1=value1&param2=value2" http://107.178.X.X

* About to connect() to 107.178.X.X port 80 (#0)
*   Trying 107.178.X.X...
* Connected to 107.178.X.X (107.178.X.X) port 80 (#0)
> POST / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 107.178.X.X
> Accept: */*
> Transfer-encoding: chunked
> Content-Type: application/x-www-form-urlencoded
>
> 1b
* upload completely sent off: 34 out of 27 bytes
< HTTP/1.1 200 OK
< Server: nginx/1.6.2
< Date: Sat, 17 Oct 2015 02:20:38 GMT
< Content-Type: text/html
< Content-Length: 867
< Last-Modified: Thu, 17 Sep 2015 14:24:25 GMT
< ETag: "55facd19-363"
< Accept-Ranges: bytes
< Via: 1.1 google
<
..........
.........


Sincerely,

Kamran
Reply all
Reply to author
Forward
0 new messages