title: NSURLSession concurrent requests with Alamofire
body: <p>I'm experiencing some strange behaviour with my test app. I've about 50 simultaneous GET requests that I send to the same server. The server is an embedded server on a small piece of hardware with very limited resources. In order to optimize the performance for each single request, I configure one instance of <code>Alamofire.Manager</code> as follows:</p>
  
  <pre><code>let configuration = NSURLSessionConfiguration.defaultSessionConfiguration()
  configuration.HTTPMaximumConnectionsPerHost = 2
  configuration.timeoutIntervalForRequest = 30
  let manager = Alamofire.Manager(configuration: configuration)
  </code></pre>
  
  <p>When I send the requests with <code>manager.request(...)</code> they get dispatched in pairs of 2 (as expected, checked with Charles HTTP Proxy). The weird thing though is, that all requests which didn't finish within 30 seconds from the first request, get cancelled because of the timeout at the same time (even if they haven't been sent yet). Here is an illustration showcasing the behaviour:</p>
  
  <p><img src="https://i.stack.imgur.com/gjXC8.png" alt="concurrent request illustration"></p>
  
  <p>Is this an expected behaviour and how can I make sure that the requests won't get the timeout before they are even sent?</p>
  
  <p>Thanks a lot!</p>