For file transfer, does ftp perform better than http?
When I have http as well as ftp options (like the Hadoop download page), should I prefer ftp?
I have tried ftp before and did not notice any significant difference. Is it supposed to perform better?
Stolen from eHow, link at the bottom
Advantages and Disadvantages of HTTP
HTTP uploads provide an incredibly simple method of uploading files to a server, with minimal knowledge about file transfers. Downloading a file is also incredibly easy too. However, the disadvantages lie in HTTP's lack of power when it comes to file uploading. Also, a programmer needs to have the knowledge required to create the form in HTML, in order to upload the file in question. This especially is true if the file is for a social network similar to Myspace or Facebook that they're creating.
Advantages and Disadvantages of FTP
Using a FTP server offers advantages of its own. For one, a user can use a program to perform a mass upload to a server, not having to worry about repeatedly having to rebrowse for files and re-upload them using one form. Downloads can also be done en masse as well. Unfortunately, an FTP server still requires an FTP client to use, and the use of one would be particularly cumbersome to those who just wanted to upload a picture or two.
Differences
Ultimately, FTP and HTTP file transfers have completely different purposes. FTP's file transfer purpose is more or less for website maintenance and batch uploads, while HTTP is for client-end work and for end users to upload things such as movies, pictures and other files to the server. Often times, a programmer will use FTP to upload the files that allow an end-user to upload files via HTML/HTTP as well.
Read more: HTTP Vs. FTP File Transfer | eHow.com http://www.ehow.com/about_5435784_http-vs-ftp-file-transfer.html#ixzz0wlUSkVIY
In general, general answers about network performance of a protocol are very difficult, because performance very much depends on the specific network setup, often more than on the protocol used.
That said, I do not know of any reason why the data throughput of http and ftp should be different. Both basically just send data over a TCP stream, so the actual data transfer process is the same. So, no, in general download speeds should be the same for ftp and http.
http is usually preferred for other reasons: It works better with firewalls (can be proxied), it allows restart of interrupted downloads, and can supply the media type along with the download (MIME), it is easier to encrypt (TLS/SSL), etc...
To me one of the biggest pitfalls of FTP is its inability to reuse sockets. FTP has 3 transfer modes, Stream, Block, and Compressed, however support for the last two is not common. In the default, and most widely used mode (Stream), the data is basically transferred as a raw stream of bytes and since it has no metadata about when it is finished with that file it must CLOSE the connection when it is done. This means if you transfer 100,000 files over FTP you are opening and closing 100,000 TCP connections. If that wasn't bad enough when one of these connections is closed it must be put in a TIME_WAIT state for a period of time. The default delay for that port to be reused on windows is 240 seconds (4 minutes). To top it all off, you only have up to 5,000 ports to use by default. This makes FTP a nightmare for transferring large amounts of small files. By tweaking the registry you can get the cooldown delay to 30 seconds and increase the max user ports to about 65,000 which will help a lot but is in no way ideal.
HTTP on the other hand can reuse the same socket for transferring multiple files. So if you have lots of files (especially smaller files) then HTTP would be the better choice without a doubt.
If you are doing just a few large files then it would not matter as much which protocol you use. I think FTP just comes to mind when people think of transferring files but that certainly doesn't mean it is better at it.