Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multithreaded FTP uploader for a single file

Tags:

java

ftp

I'm trying to implement a Maven plugin to upload an assembly (a very huge one, > 1.5 Gb) to the FTP in a multithreaded manner to save time during build preparation. Is there any specific library I can use for that? Or if there's a way to assemble uploaded parts right on the FTP server?

Many Thanks, Vlad.

like image 449
Vlad Avatar asked Mar 22 '26 20:03

Vlad


1 Answers

The FTP client upload limitation is driving by TCP Window Size 64KB and latency of connection. I proven the concurrent upload speed are not limited by bandwidth only. Means even you have a 100Mbps connection link with 50ms latency, the max. upload speed for single FTP thread just have 1280Kbyte/s.

Solution1, Change the TCP Window Size to 129KByte the transmit data will be double. Solution2, Allow more than 1 thread with same source IP and source file.

like image 158
Jeta Avatar answered Mar 24 '26 09:03

Jeta