0

I am developing Azure Wep App (C# Wep Api 2.0).

This app will be used to receive file upload request & then save files in Azure blob & will create a record in Azure Database.

I am bit confused, whether I should opt for a method that will receives all the files in single request then I should process files 1 by 1 using async. OR I should opt for a method that will cater single file at a time and on client side I send files 1 by 1 to Wep App.

Also I am planning to implement Web Sockets for this, so that my files do not get lost while uploading. But I am not sure about this will work well or not?

Any other ideas to resolve this are welcome.

Thanks

user1400290
  • 1,682
  • 5
  • 23
  • 43

1 Answers1

1

If your client is uploading 10 files in parallel, or 10 files serially, the main constraint on performance is likely to be their available bandwidth. The total time taken wont be any different for them. Consequently it would be better use of Azures scalability for the client to be able to call one method (URL) per file; in this case your code only ever has to handle one upload. If your web programmer wants to upload multiple async or one-by-one, your code doesn't need to care.

I certainly wouldn't handle multiple file uploads in a single web method call - if you do that you are creating an artificial processing bottlneck and its not as scalable as allowing Azure to scale our your web method call.

PhillipH
  • 6,182
  • 1
  • 15
  • 25