commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Will Stranathan" <>
Subject Re: [FileUpload] Speeding up uploads
Date Fri, 13 Jun 2003 12:05:22 GMT
With FTP, a separate channel is usually opened for transferring the file.  
With HTTP, the file is sent over the same port as the rest of the request.  
So with FTP, the original socket is used for communicating WHEN the transfer 
of the file is complete.  With HTTP, the server has to process byte-by-byte 
the request to find the markers that separate the fields.  That's probably 
where the bulk of the problem is.  (Depending on your configuration, you may 
also want to consider that HTTP servers are optimized for SENDING.  FTP 
servers are typically optimized for handling either direction efficiently.)

So, the short answer is FTP is prolly quicker because it just has to write 
the bits - it gets external notification when there are no more bits to 
write.  With HTTP, the server has to process every bit to find when the last 
one is received.

>From: Cindy Ballreich <>
>Reply-To: "Jakarta Commons Users List" <>
>Subject: [FileUpload] Speeding up uploads
>Date: Wed, 11 Jun 2003 09:30:52 -0700
>This is slightly off-topic since it doesn't specifically refer to 
>FileUpload, but I'm not finding info anywhere else so I might as well 
>I've noticed that uploads using multipart/form-data encoding are a lot 
>slower than other types of uploads (especially on large files). I've tested 
>using org.apache.commons.fileupload, com.oreilly.servlet.multipart, and a 
>perl cgi script. All three give the same results. The upload speeds seem to 
>be about half that of an ftp upload of the same file on the same type of 
>connection. Are there any tricks or techniques for speeding up 
>multipart/form-data uploads of large files?
>Tomcat 4.1.24 with Apache 1.3.26 (mod_jk) and fileupload 1.0-rc1 on RedHat 
>To unsubscribe, e-mail:
>For additional commands, e-mail:

The new MSN 8: smart spam protection and 2 months FREE*

View raw message