title: Background upload of large amount of data
body: <p>I need to upload large number of photos to a server from my iOS device. For example, 500 photos. How should I do this right? </p>
  
  <p>I created upload task with background session configuration with NSURLSession for each photo. I tried making my own custom queue where each next task would launch after completion of previous one. But at one moment new task wasn't starting. I guess, because it all was happening in the background. More on this issue, you can read <a href="https://krumelur.me/2015/11/25/ios-background-transfer-what-about-uploads/" rel="nofollow noreferrer">here</a>  </p>
  
  <p>(If approach with a queue was right, would you please advise a good realisation of a queue for async tasks, because I may messed up something in my implementation)</p>
  
  <p>So after article linked above, my guess was I should start all upload tasks at once (not one after another). But I have efficiency concern. If I would create a task for each photo, it would 500 background async task and about 1 gigabyte of a data uploading parallel. I guess, it would cause some problem with network. </p>
  
  <p>To sum up all said above, which is the right way to upload large piece of data in background in iOS (500 photos in my case)?</p>