WCF通道缓冲区清除

WCF通道缓冲区清除

本文介绍了当客户端实时数据不同步时,WCF通道缓冲区清除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



Hi ,

Background of the project:
We have been working on Silverlight application which uses PollingDuplex channel for getting data from the web server(IIS7).
The application gets data for every 500ms and updates onto the UI.  We have 5 clients connected and  at every second we have 20 updates flowing to Silverlight client application from server.

Problem statement:
It works fine for sometime but when the load on IIS increases or when there is a network flip, we see that the polling duplex channel starts buffering data and over period of time not all clients are showing same updates.
When we check further we see that the channel has buffered more than 5 minutes data and it takes time to clear it.

Binding details for the polling duplex channel are as shown below:
<pollingDuplexHttpBinding>
<binding name="UpdateServiceBinding" maxBufferSize="300000" maxBufferPoolSize="300000" maxReceivedMessageSize="300000" receiveTimeout="00:05:00" sendTimeout="01:00:00" openTimeout="00:01:00" inactivityTimeout="23:59:00" serverPollTimeout="00:01:00">
                     <readerQuotas maxDepth="64"  maxStringContentLength="300000" maxArrayLength="300000" maxBytesPerRead="100000" maxNameTableCharCount="100000"/>
                     </binding>
</pollingDuplexHttpBinding>

Throttling settings of service:
<behavior name="RVSServiceBehavior">
                     <serviceMetadata httpGetEnabled="true"/>
                     <serviceDebug includeExceptionDetailInFaults="true"/>
                     <serviceThrottling maxConcurrentCalls="3000" maxConcurrentSessions="3000" maxConcurrentInstances="3000"/>
       </behavior>


Questions:
1.  How can we ensure that the channel does not buffer data and just sends the latest always?
2.  How can we optimize the IIS for increase in load?

Your help would be really appreciated.

推荐答案


这篇关于当客户端实时数据不同步时,WCF通道缓冲区清除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-14 15:59