You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
downlaod large file from Jetty (ambari webhdfs) is slow
I have a file about 5G, download from hdfs at 12M/s, buy my network could reach 500M/s, and smaller file work fine. Then I reproduced this problem with curl, and requests.
I think this probably caused by Transfer-Encoding: chunked from server when file is large, server choose this because when server transfer the file the file size has not yet be decided, chunked stream could give a lots of overhead. If given Connection: close then server would not use Transfer-Encoding: chunked to indicate the end of steam, just close the connection instead.
I add Connection: close to request and it seems have solved this problem
downlaod large file from Jetty (ambari webhdfs) is slow
I have a file about 5G, download from hdfs at 12M/s, buy my network could reach 500M/s, and smaller file work fine. Then I reproduced this problem with curl, and requests.
Here is curl debug log:
curl -v -X GET http://x.x.x.x/file
After some digging, I found if attach header Connection: close to the request, it could end up much faster.
curl -v -H "Connection: close" -X GET http://x.x.x.x/file
I think this probably caused by Transfer-Encoding: chunked from server when file is large, server choose this because when server transfer the file the file size has not yet be decided, chunked stream could give a lots of overhead. If given Connection: close then server would not use Transfer-Encoding: chunked to indicate the end of steam, just close the connection instead.
I add Connection: close to request and it seems have solved this problem
Though I am not sure if this could bring any side affect.
Any suggestions?
The text was updated successfully, but these errors were encountered: