从WCF客户端向WCF服务发送数据时,数据传输速度变慢(NET.TCP绑定)

时间:2011-02-23 16:52:15

标签: .net wcf performance tcp

我有一个WCF客户端,它建立了与WCF服务器的连接。当我启动我的主机应用程序时,客户端工作正常,并及时接收和响应请求。但是大约一分钟后,随着负载的增加,这个过程会慢慢爬行。

我已将问题追溯到将响应发送回WCF服务器所花费的时间。发送简单的文本(不超过2 Kb)需要10-15秒,有时甚至更长。

WCF服务器本身运行良好(据我所知)

是否有任何可以调整的特定设置可能会加快吞吐量或纠正这种情况?

服务与net.tcp绑定通信。这是我的配置设置

<system.serviceModel>
    <bindings>
        <netTcpBinding>
            <binding name="NetTcpBinding_Comms" closeTimeout="00:01:00"
                openTimeout="00:01:00" receiveTimeout="00:10:00"
                sendTimeout="00:01:00" transactionFlow="false" 
                transferMode="Buffered" transactionProtocol="OleTransactions"
                hostNameComparisonMode="StrongWildcard" listenBacklog="500"
                maxBufferPoolSize="524288" maxBufferSize="65536"
                maxConnections="500" maxReceivedMessageSize="65536">
                <readerQuotas maxDepth="32" maxStringContentLength="8192"
                    maxArrayLength="16384" maxBytesPerRead="4096"
                    maxNameTableCharCount="16384"/>
                <reliableSession ordered="true" inactivityTimeout="00:10:00"
                    enabled="false"/>
                <security mode="None">
                    <transport clientCredentialType="Windows"
                        protectionLevel="EncryptAndSign"/>
                    <message clientCredentialType="Windows"/>
                </security>
            </binding>
        </netTcpBinding>
    </bindings>

    <client>
        <endpoint address="net.tcp://a.b.com:9150/Comms/"
            binding="netTcpBinding" bindingConfiguration="NetTcpBinding_Comms"
            contract="Outside.Comms" name="NetTcpBinding_Comms">
            <identity>
                <dns value="a.b.com"/>
            </identity>
        </endpoint>
    </client>
</system.serviceModel>

0 个答案:

没有答案