gpt4 book ai didi

performance - ConnectionManagement.MaxConnections和ServicePointManager.DefaultConnectionLimit有什么区别?

转载 作者:行者123 更新时间:2023-12-02 05:17:50 24 4
gpt4 key购买 nike

我需要增加客户端建立的并发连接数,并且遇到了以下属性:ConnectionManagement.MaxConnections和ServicePointManager.DefaultConnectionLimit。两者在我看来都一样。有什么不同?

最佳答案

我也在尝试了解这些设置。

我怀疑:

  • ServicePointManager.DefaultConnectionLimit用于管理它将对任何主机打开的连接数,因为它管理和对ServicePoints进行排队。
  • 配置“maxconnection”按主机,主机组或AppDomain中的所有WebRequest设置对待处理请求总数的限制。

  • 因此,如果ServicePointManager.DefaultConnectionLimit = 200和// connectManagement [address =“*” maxconnections = 100],则有效限制为100,ServicePointManager将创建200个ServicePoint,但是WebRequest仅允许其中100个同时具有连接。

    这是我的假设,需要证明。我想我需要阅读源代码才能找到答案。

    我找不到有关此主题的许多博客文章,这是到目前为止我发现的唯一博客文章。

    http://forums.asp.net/t/1979003.aspx?Speeding+Up+HTTPWebRequests+and+the+ServicePointManager

    关于performance - ConnectionManagement.MaxConnections和ServicePointManager.DefaultConnectionLimit有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21641323/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com