Web Connection
Slow Uploads
Gravatar is a globally recognized avatar based on your email address. Slow Uploads
  Scott R
  All
  May 22, 2024 @ 03:14am

Hi Rick,

We use web connect as a rest API and our front end is pure Vue.js / JS that runs on client side browser only. As part of our application, users can upload pictures of their jobs sites. We're running into an issue where the picture uploads are taking anywhere from 20-100 seconds. When I look at my logs in web connect for how long my method takes to process the picture and save it, we're approx. 5 seconds which I can live with. When I do a speed test on the phones that are uploading pictures they come in at 8 Mbps. When we record how long it actually takes to do the upload, we're seeing results more around .08 Mbps (1% of what the speed test says we should get). The files we are uploading are around 1Mb - 3MB (so not huge files) (we are currently doing this as 1 post, so it's not multiple 'chunks', just 1 post with the 1MB file as a base64 string in the body).

I haven't had much luck in tracking this down but was wondering if you knew if there's problems with either IIS with files like this or in your .Net Code before you hand it off to our exe to process? Again, once it hits my code inside of webconnect, I'm pretty happy with the 5 seconds to process it. Just trying to figure out what could be the bottle neck here and why we aren't seeing the speeds the speedtest on the phone claims we should be. (web connect is running on a vultr box with 1 Gbps up / down so I don't think that's the problem)

Gravatar is a globally recognized avatar based on your email address. re: Slow Uploads
  Rick Strahl
  Scott R
  May 23, 2024 @ 06:51am

Not that I know of. I have several apps running with various customers that do image uploads from phones (photos taken with the camera) that are likely around the same size and the uploads are nearly instant.

I would suspect network or routing issues that are slowing things down if you're seeing slow upload speeds. First things to check:

  • Try local access (from the same machine, then from the same network)
  • Try from external desktop and phones and compare

IIS will take whatever comes in from the network - there's no throttling unless it's explicitly enabled so if network speed is slow it's something that happens in front of IIS at the network adapter or router.

Another thing might be Anti-Virus or other data protection software - if you have that running it might be looking at the incoming data before it passes it on. This would have to be something explicitly installed, not default Windows checking.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Slow Uploads
  Scott R
  Rick Strahl
  May 23, 2024 @ 12:49pm

Interesting... We don't have any external data 'sniffers' if you will that would slow it down..

We are doing xmlHttpRequest on the JS client side. From what I've read, there' not much of a performance difference between that and the new(ish) fetch() api correct? Is there a difference in speeds from uploading with a client side app versus a server side site? We've ruled out the obvious stuff so on to what else it could be..

Gravatar is a globally recognized avatar based on your email address. re: Slow Uploads
  Rick Strahl
  Scott R
  May 23, 2024 @ 05:15pm

fetch and xmlHttpClient use the same underlying stack inside of the browser, so that wouldn't be it.

As I suggested you should test from different environments. Upload from within the network and see what perf you get. Use a desktop app (wwHttp or .NET or Powershell) and use a browser and see if you get different results.

If all else fails using something like Wireshark might help to track the Http bits and see what all is being hit and if it's really slow you might be able to see where it's getting hung up.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Slow Uploads
  Scott R
  Rick Strahl
  May 24, 2024 @ 03:17am

Sounds good. Thanks!

© 1996-2024