简体   繁体   English

WCF MaxPendingChannels设置与MaxConnections

[英]WCF MaxPendingChannels setting vs MaxConnections

what is the relation between those properties? 这些属性之间有什么关系? which one of them govern the number of clients connect to net.tcp reliable service? 其中哪一个控制着连接到net.tcp可靠服务的客户端数量?

I tried to read on both of them but tit is not clear which control what in the throtlling of the service 我试图阅读它们两个,但山雀尚不清楚哪个控制在服务的节流中

Hope this is helpful. 希望这会有所帮助。

MaxPendingChannels has to do with the number do number of clients that can connect to a service via reliable session. MaxPendingChannels与可以通过可靠会话连接到服务的客户端数量有关。

When the sender creates a reliable session channel to a receiver, a handshake between them establishes a reliable session. 当发送方创建到接收方的可靠会话通道时,它们之间的握手将建立可靠的会话。 After the reliable session is established, the channel is put in a pending channel queue for acceptance by the service. 在建立可靠会话之后,将通道放入待处理通道队列中,以供服务接受。 The MaxPendingChannels property indicates how many channels can be in this state. MaxPendingChannels属性指示在此状态下可以有多少个通道。

MaxConnection behavior depends if it is set on the client or the server: On the client, it's a limit on the connections that are pooled, and on the server it's a limit on connections that haven't been accepted yet by the ServiceModel layer, ref MaxConnection行为取决于是在客户端还是在服务器上设置的:在客户端上,这是对池化连接的限制,而在服务器上,这是对尚未被ServiceModel层接受的连接的限制,请参见

In my opinion, this property describes the same thing, the number of channels that clients can connect to at the same time. 在我看来,此属性描述的是同一件事,即客户端可以同时连接的通道数。 With one difference, the default Concurrencymode for the WCF service is concurrencymode.single, which limits the number of connections a customer can make. 唯一的不同是,WCF服务的默认Concurrencymode为concurrencymode.single,它限制了客户可以建立的连接数。 In this mode, maxconnection represents the maximum number of connections allowed to be pending dispatch on the server, and maxpendingchannels refers to the number of connections for a reliable session. 在此模式下,maxconnection表示允许在服务器上待调度的最大连接数,而maxpendingchannels指的是可靠会话的连接数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM