Windows Server 2008 上的最大 tcp/ip 连接数 [英] Max tcp/ip connections on Windows Server 2008

查看:167
本文介绍了Windows Server 2008 上的最大 tcp/ip 连接数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 .Net 服务,它通过 TCP 协议侦听单个端口.客户端连接,然后传输数据一段时间(从几分钟到几个小时).

I have .Net service that listens on single port over TCP protocol. Clients connect and then transmit data for some time (from few minutes to several hours).

Windows 2008 服务器上的连接数有限制吗?我没有打任何,因为现在有多达 50 个用户.计划是有几千个用户,所以我想知道以后会不会有问题.

Is there any limit on number of connections on Windows 2008 server? I did not hit any, since now there is up to 50 users. Plan is to have thousands of users, so I'd like to know if there will be problems in future.


正如 Cloud 回答的那样,似乎在某些版本的 Windows Server 2008 中存在一些限制.是否有关于这些限制的参考?我试过谷歌,但它返回关于半绑定 tcp 连接限制的文章.


As Cloud answered, it seems that there are some limits in some versions of Windows Server 2008. Is there any reference on those limits? I tried Google, but it returns articles on limit on half-bound tcp connections.

推荐答案

有多少万用户?

我过去曾在 Windows 2003 Server 上运行过一些 TCP/IP 客户端/服务器连接测试,并在一个相当低规格的 VM 上管理了超过 70,000 个连接.(请参阅此处了解详情:http://www.lenholgate.com/blog/2005/10/the-64000-connection-question.html).如果 Windows 2008 Server 仅限于小于 2003 Server,我会非常惊讶,恕我直言,Cloud 链接到的帖子太模糊而无法使用.这种问题经常出现,我在博客上写了为什么我真的不认为这是你真正应该担心的事情:http://www.serverframework.com/asynchronousevents/2010/12/one-million-tcp-connections.html.

I've run some TCP/IP client/server connection tests in the past on Windows 2003 Server and managed more than 70,000 connections on a reasonably low spec VM. (see here for details: http://www.lenholgate.com/blog/2005/10/the-64000-connection-question.html). I would be extremely surprised if Windows 2008 Server is limited to less than 2003 Server and, IMHO, the posting that Cloud links to is too vague to be much use. This kind of question comes up a lot, I blogged about why I don't really think that it's something that you should actually worry about here: http://www.serverframework.com/asynchronousevents/2010/12/one-million-tcp-connections.html.

我个人会测试一下.即使您打算使用的 Windows 2008 Server 版本没有内在限制,仍然存在基于内存、处理器速度和服务器设计的实际限制.

Personally I'd test it and see. Even if there is no inherent limit in the Windows 2008 Server version that you intend to use there will still be practical limits based on memory, processor speed and server design.

如果您想运行一些通用"测试,您可以使用我的多客户端连接测试和关联的回显服务器.详情请见:http://www.lenholgate.com/blog/2005/11/windows-tcpip-server-performance.html 和这里:http://www.lenholgate.com/blog/2005/11/simple-echo-servers.html.这些是我过去为我的服务器框架运行自己的测试所用的东西,这些使我能够在具有 760MB 内存的 Windows 2003 Server VM 上创建 70,000 个活动连接.

If you want to run some 'generic' tests you can use my multi-client connection test and the associated echo server. Detailed here: http://www.lenholgate.com/blog/2005/11/windows-tcpip-server-performance.html and here: http://www.lenholgate.com/blog/2005/11/simple-echo-servers.html. These are what I used to run my own tests for my server framework and these are what allowed me to create 70,000 active connections on a Windows 2003 Server VM with 760MB of memory.

已编辑以从下面的评论中添加详细信息...

如果您已经在考虑使用多个服务器,我会采用以下方法.

If you're already thinking of multiple servers I'd take the following approach.

  1. 使用我链接的免费工具向自己证明,你可以创建合理数量的连接到您的目标操作系统(注意 Windows 对可能导致您的动态端口客户端连接失败,搜索对于 MAX_USER_PORT).

在开发过程中定期用 test 测试你的实际服务器可以创建连接的客户端并且实际上做某事"服务器.这将有助于防止你以这样的方式构建服务器限制其可扩展性.请参阅此处:http://www.serverframework.com/asynchronousevents/2010/10/how-to-support-10000-or-more-concurrent-tcp-connections-part-2-perf-tests-from-day-0.html

during development regularly test your actual server with test clients that can create connections and actually 'do something' on the server. This will help to prevent you building the server in ways that restrict its scalability. See here: http://www.serverframework.com/asynchronousevents/2010/10/how-to-support-10000-or-more-concurrent-tcp-connections-part-2-perf-tests-from-day-0.html

这篇关于Windows Server 2008 上的最大 tcp/ip 连接数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆