What is the maximum file size I can transfer using HTTP? And using FTP?

纵饮孤独 提交于 2019-11-27 17:17:56

问题


Added: I am conducting a study for a new system we're going to develop in my work. It consists in authenticating users, displaying what files they want to download and downloading them. Also, if the files are not readily available, the user can't download them, but the server obtains a copy of the requested file and notifies the user by mail when he can get the file. We expect files to be tipically from 2 to 50 gigabytes in size, for now.

I just want to check if it's possible to write a Web application to solve the problem or if we need to make a client-server solution.


回答1:


There is no maximum. Any max you are encountering is application specific or site specific.

I've downloaded DVD isos from Microsoft using HTTP and FTP without issue (~4gb).

I've also uploaded huge files via both methods.

Can you elaborate on what you're trying to do?




回答2:


As already answered, the protocol has no limitations, but most HTTP servers have default upload limits out-of-the-box:

IIS6 uses MaxRequestEntityAllowed (default is 4GB) and AspMaxRequestEntityAllowed (default is 200000 bytes) in metabase.xml.

IIS7 uses maxRequestEntityAllowed: **appcmd set config /section:asp /maxRequestEntityAllowed:***int* (default is 200000 bytes)

Apache uses LimitRequestBody (default is 2GB)




回答3:


There are no such limitation by-design in protocols you said. Only timeouts on concrete servers




回答4:


The upload in HTTP is usualy limited as the server has to wait until the (mostly slow) upload is finished to respond to the request.




回答5:


And one important question - are you going to upload or download?

I could say that downloading has significantly less limitations that uploading. I don't know why. Maybe because main purpose of HTTP and FTP is sending data, not receiving.

That's why HTTP/FTP servers could break upload session more frequently rather then downloading session.




回答6:


Since the size of a transfer is probably stated near the beginning, I'd bet the limit of your file size is the same as the limit for an unsigned integer. Judging by the time period when HTTP and FTP became popular and useful, I'd say that's a 32-bit unsigned integer, so 2^32 Bytes, or 4.0 GiB.




回答7:


For TCP protocol, you have sequence number from 0 to 2^32-1. Suppose worst case when you increase sequence by 1 for each byte. Now maximum file size is 4GB. And you have a 1GBps connection. All sequence finish in 4sec which is wrap around time. If TTL is greater than wrap around time so we can't reuse sequence so maximum file size is 4GB.

But Magic is in TCP Options, in options we can add a timestamp. Now Problem solved even if we get with same source and same destination same sequence number but we have different timestamp to identify.



来源:https://stackoverflow.com/questions/461282/what-is-the-maximum-file-size-i-can-transfer-using-http-and-using-ftp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!