title: Concurrent WCF calls via shared channel
body: <p>I have a web tier that forwards calls onto an application tier. The web tier uses a shared, cached channel to do so. The application tier services in question are stateless and have concurrency enabled.</p>
  
  <p>But they are not being called concurrently.</p>
  
  <p>If I alter the web tier to create a new channel on every call, then I <em>do</em> get concurrent calls onto the application tier. But I want to avoid that cost since it is functionally unnecessary for my scenario. I have no session state, and nor do I need to re-authenticate the caller each time. I understand that the creation of the channel factory is far more expensive than than the creation of the channels, but it is still a cost I'd like to avoid if possible.</p>
  
  <p>I found <a href="http://msdn.microsoft.com/en-us/library/aa738757.aspx" rel="nofollow noreferrer">this article</a> on MSDN that states:</p>
  
  <blockquote>
    <p>While channels and clients created by
    the channels are thread-safe, they
    might not support writing more than
    one message to the wire concurrently.
    If you are sending large messages,
    particularly if streaming, the send
    operation might block waiting for
    another send to complete.</p>
  </blockquote>
  
  <p>Firstly, I'm not sending large messages (just a lot of small ones since I'm doing load testing) but am still seeing the blocking behavior. Secondly, this is rather open-ended and unhelpful documentation. It says they "might not" support writing more than one message but doesn't explain the scenarios under which they would support concurrent messages.</p>
  
  <p>Can anyone shed some light on this?</p>
  
  <p>Addendum: I am also considering creating a pool of channels that the web server uses to fulfill requests. But again, I see no reason why my existing approach should block and I'd rather avoid the complexity if possible.</p>