【问题标题】:WCF MaxPendingChannels setting vs MaxConnectionsWCF MaxPendingChannels 设置与 MaxConnections
【发布时间】:2018-12-31 20:07:33
【问题描述】:

这些属性之间的关系是什么?其中哪一个控制连接到 net.tcp 可靠服务的客户端数量?

我试图阅读它们,但不清楚哪个控制服务的节流

【问题讨论】:

    标签: wcf duplex


    【解决方案1】:

    希望这有帮助。

    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.

    MaxConnection 行为取决于它是在客户端还是服务器上设置:在客户端上,它是对池中连接的限制,而在服务器上,它是对尚未被 ServiceModel 接受的连接的限制层,ref

    【讨论】:

      【解决方案2】:

      在我看来,这个属性描述的是同一件事,客户端可以同时连接的通道数。有一个区别,WCF 服务的默认并发模式是 concurrencymode.single,它限制了客户可以建立的连接数。在这种模式下,maxconnection 表示服务器上允许等待调度的最大连接数,maxpendingchannels 是指可靠会话的连接数。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2014-08-31
        • 1970-01-01
        • 1970-01-01
        • 2018-03-16
        • 1970-01-01
        • 2011-01-11
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多