【问题标题】:Appfabric cache maxconnectionstoserverAppfabric 缓存 maxconnectionstoserver
【发布时间】:2012-07-13 13:23:59
【问题描述】:

我有一个关于使用 AppFabric 缓存时网络连接限制的问题。

就基于 ASP.NET WCF 的应用程序而言,Windows AppFabricCache 'maxConnectionsToServer' 设置如何与 System.Net 'maxconnection' 设置交互?

例如。如果如下所示,maxConnectionsToServer 设置为 100,但 maxconnection 设置为 50,那么 maxconnection 是否会“覆盖”并变为 100?还是maxconnection中的值限制了maxConnectionsToServer的值?

...

<dataCacheClient requestTimeout="2000" channelOpenTimeout="0" maxConnectionsToServer="100">
  <hosts>
    <host name="127.0.0.1" cachePort="22233" />
  </hosts>
  <localCache isEnabled="true" sync="TimeoutBased" objectCount="10000" ttlValue="21600" />
</dataCacheClient>

...

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

...

提前致谢

【问题讨论】:

    标签: asp.net appfabric connection throttling


    【解决方案1】:

    system.net/connectionManagement 对 AppFabric 使用的 net.tcp 连接没有影响,只有由 ServicePoint 基础结构管理的 HTTP 连接。因此,您不必担心,只需为 maxConnectionsToServer 指定的内容即可。除非您看到争用,否则我可能不会将其设置为高于核心数。

    为了将来的参考,我还应该指出,如果您使用的是 ASP.NET 并且没有更改默认的 processModel/@autoConfig 属性,那么 ASP.NET 实际上将覆盖任何通过 .配置文件到 12 * Environment.ProcessorCount。如果您无法更改 machine.config 中的 processModel/@autoConfig 或在 IIS7.5 中为应用程序池使用 CLRConfigFile,则您必须在应用程序启动期间通过设置 ServicePointManager.DefaultEndpointConnectionLimit 以编程方式重新覆盖此值(例如 Application_Start)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-12-24
      • 2011-08-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-29
      • 1970-01-01
      相关资源
      最近更新 更多