I am creating a testing tool to stress load a server. I create many different threads that send seperate requests to the server. It appears to be limited by the ChannelFactory. It bottlenecks on making the actual service call, for example:
_proxy.MyServiceCall(...);
I've tried several different approaches:
- Using a single static ChannelFactory shared by all the threads
- Creating a new channel factory per thread
- Creating a new channel factory per call
All these result in fairly similar performance. There appears to be a global static pool of available connections that the channel factory is using. I've tried looking this up but couldn't find anything. Would you know more about this? Do you think my guess that there is a static pool of connections is correct? If so do you know how that would be configurable?
This is the current configuration for the testing application:
<configuration>
<system.serviceModel>
<client>
<endpoint binding="wsHttpBinding" bindingConfiguration="SynchronizationServiceBinding" contract="My.Namespace.ISynchronizationService" name="ClientBinding">
</endpoint>
</client>
<bindings>
<wsHttpBinding>
<binding name="SynchronizationServiceBinding" maxBufferPoolSize="2147483647" maxReceivedMessageSize="10485760">
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
<reliableSession enabled="false"/>
<readerQuotas maxArrayLength="1000000"/>
</binding>
</wsHttpBinding>
</bindings>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup> </configuration>