C
C#3w 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
Where are you storing the data?
mg
mg3w ago
☝️, are you sure it's a problem in your app, or could there be a bottleneck further down the line?
Chrys
ChrysOP3w ago
@Mayor McCheese @mg code from endpoint
No description
mg
mg3w ago
Does it do what you expect when run locally?
Chrys
ChrysOP3w ago
when I'm on localhost the endpoint response is instantaneouswhen I'm on localhost the endpoint response is instantaneous yes
mg
mg3w 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
ChrysOP3w ago
are consistent, maybe I can even tell where it is relative to the file size
Mayor McCheese
Try and create a f1 app service in your region and see if it's different result F1 is free
Chrys
ChrysOP3w ago
ok
Chrys
ChrysOP3w 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 ✿
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
ChrysOP3w ago
I don't know what this is, is there an article about this in asp net?
Chrys
ChrysOP3w ago
with a 4kb file it is practically instantaneous
No description
Mayor McCheese
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