I'm working on an async uploader in JavaScript intended to send multi-gigabyte files to our server efficiently. It uses JavaScript's FileReader
to slice the files 5MB chunks at a time, and send 5 chunks concurrently.
Seems that the bottle neck is getting the data to the server:
As indicated in the picture above, it took about 2 minutes for the chunk to reach the server. Then it only took 3 seconds for the server to process it.
My upload speed is about 1mbps, but I'm able to upload same 400MB file (a test video) to YouTube several times faster than using this uploader thing.
Questions
- What exactly is happening during the 2:06 minutes during
Request sent
? - What can be done to speed things up during that phase?
- I've tried tried sending the data as raw binary (
FileReader.readAsBinaryString
) vs base64 encoded (~40% larger payload just balling it), with no apparent benefits in my scenario - Since I'm using AWS/S3, the minimum payload size has to be 5MB
- I've tried tried sending the data as raw binary (