0

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:

enter image description here

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
Community
  • 1
  • 1
rodrigo-silveira
  • 12,607
  • 11
  • 69
  • 123

1 Answers1

0

What exactly is happening during the 2:06 minutes during "Request sent"?

The connection has been already set, so the only thing that's happening is transferring data to the server.

What can be done to speed things up during that phase?

I'm afraid that's too broad question for Stack Overflow. Research this topic by yourself, try something, and if you encounter any specific problems, feel free to ask here.

Michał Perłakowski
  • 88,409
  • 26
  • 156
  • 177