C
C#2mo ago
Chrys

Very slow upload in asp.net

I'm trying to create an ASP.NET API route to send PDF files, but it's terribly slow, it takes 2 minutes for the server to accept 8MB. The application is hosted on Azure, as a web app, with a decently good hardware plan. The only problem I can think of is that I'm from a different region than the host (host East USA, client Brazil). But my internet is good, around 700mbps download and 350mbps upload. Other colleagues at my work have tested it (from Brazil too) and it takes almost the same amount of time.
No description
No description
14 Replies
Mayor McCheese
Mayor McCheese2mo ago
Where are you storing the data?
mg
mg2mo ago
☝️, are you sure it's a problem in your app, or could there be a bottleneck further down the line?
Chrys
ChrysOP2mo ago
@Mayor McCheese @mg code from endpoint
No description
mg
mg2mo ago
Does it do what you expect when run locally?
Chrys
ChrysOP2mo ago
when I'm on localhost the endpoint response is instantaneouswhen I'm on localhost the endpoint response is instantaneous yes
mg
mg2mo ago
Are the long upload times on the server consistent? I've found Azure sometimes has weird cold start delays even with production plans e.g. my first request will take a couple minutes but then subsequent requests are fine
Chrys
ChrysOP2mo ago
are consistent, maybe I can even tell where it is relative to the file size
Mayor McCheese
Mayor McCheese2mo ago
Try and create a f1 app service in your region and see if it's different result F1 is free
Chrys
ChrysOP2mo ago
ok
Chrys
ChrysOP2mo ago
With the web app in Brazil, the time has decreased a lot, but I still think it's a bit unfeasible to take 15 seconds to return just the file name.
No description
✿ Scarlet ✿
✿ Scarlet ✿2mo ago
Have you tried parallel file part sending? Not sure if it would be suitable in your case but it consists in dividing the file and uploading N parts at the same time
Chrys
ChrysOP2mo ago
I don't know what this is, is there an article about this in asp net?
Chrys
ChrysOP2mo ago
with a 4kb file it is practically instantaneous
No description
Mayor McCheese
Mayor McCheese2mo ago
Is the performance adequate or not, you've done some checking. 8MB is a bit, but you have to receive the whole file before returning the file name. Before doing anything else examine your goals and ask if you're meeting them.
Want results from more Discord servers?
Add your server