So, chunk encoding makes lots of sense serving pages to web browsers because they are good at processing partial responses. However, what about HTTP APIs? Has anyone got any good benchmarks for HTTP APIs for different payload sizes comparing chunked vs non-chunked?
1
If the payload is small e.g. under 1000bytes, but network latency high due to distance, would you not pay for an extra network roundtrip?
I was under the impression the next chunk wouldn't be sent by theserver until it received some acknowledgement that the client had read the first. But this could just be my severe lack of knowlege of anything below the HTTP layer.
3
Replying to @darrel_miller @mnot
Acknowledgements happen on the TCP layer in the exact same way as for non-chunked transfers

Jul 6, 2018 · 4:47 AM UTC

1