views:

190

answers:

1

I have WCF client to send request to a service. And my business code call the client API to send 300+ requests per second. But my client only sends about 50 to service according to te performance counters of my service and WCF ServicePoint.

And I have increased ServicePointManager.DefaultConnectionLimit to 1000 in code, and setted maxConCurrentCalls to 1000 in service configuration file but got little improvement.

I guess there might be queue in WCF client for requests to send. Is there any way to configure it and speed up my client.

Here is my configuration for client:

<basicHttpBinding>
    <binding name="Binding" closeTimeout="00:01:00" openTimeout="00:01:00"
        receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
        bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
        maxBufferSize="2000000" maxBufferPoolSize="524288" maxReceivedMessageSize="2000000"
        messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
        useDefaultWebProxy="false">
      <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
          maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      <security mode="None">
        <transport clientCredentialType="None" proxyCredentialType="None"
            realm="" />
        <message clientCredentialType="UserName" algorithmSuite="Default" />
      </security>
    </binding>
  </basicHttpBinding>
A: 

You may be hitting the connection limit for out going http connections:

<system.net>
  <connectionManagement>
     <add address="*" maxconnection="8"/>
  </connectionManagement>
</system.net>

Note the default value is 2.

Shiraz Bhaiji
Is it the same as ServicePointManager.DefaultConnectionLimit? I have updated it to 1000 in code.
Sonic Lee
I do not think that it is the same. Try putting the above configuration in the config file of your wcf client.
Shiraz Bhaiji