我的 TCP/IP 服务器上的最大连接数/线程数?

发布于 2024-12-17 16:12:09 字数 182 浏览 1 评论 0原文

我很好奇我的服务器在 Linux 还是 Windows 上运行得更好,据我所知,Windows 仅支持大约 2,000 个连接/线程,而我还没有看到太多关于 Linux 可以处理多少线程/连接的信息。

除了 TCP/IP 服务器的稳定性/安全性之外,使用 Linux 相对于 Windows 是否还有其他优势?

谢谢。

I am curious about whether my server would work better on Linux or Windows, from what I have read Windows only supports around 2,000 connections/threads while I have not seen much information about how many threads / connections Linux can handle.

Is there any advantages to using Linux over Windows other than stability / security for my TCP /IP server?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

弃爱 2024-12-24 16:12:09

线程和套接字是不同的资源,每种资源的限制不仅取决于 LinuxWindows,还取决于您所使用的每个操作系统的版本。此外,如果您使用类库而不是原始套接字或线程 API,这些可能会施加特定的限制。例如,MFC 中 CSocket 的早期版本为每个套接字创建了一个隐藏窗口,因此您实际上受到系统上 GDI 资源数量的限制。

Threads and sockets are different resources, the limits for each will depend not just on Linux vs Windows but also which versions of each OS you are using. Also, if you're using a class library instead of raw socket or thread APIs, those might impose a specific limit. As an example early versions of CSocket in MFC created a hidden window for each socket, so you were effectively limited to the number of GDI resources on the system.

绅刃 2024-12-24 16:12:09

任何一个平台都可以,而且大多数应用程序永远不会变得足够大,以至于需要多个服务器来运行它们。以对您来说更容易的方式完成您的项目。

Either platform will be fine, and most apps will never get big enough to need more than a single server to run them anyway. Get your project done in whichever way is easier for you.

多像笑话 2024-12-24 16:12:09

我认为构建大规模应用程序时主要关注的是团队中工程师(包括运营工程师)的经验。无论如何,在选择平台时考虑性能,但开发和运营工程师的经验和偏好可能更重要 - 毕竟,他们需要分别维护和运营服务。

无论如何,如果您确实需要具有 2000 个并发客户端的服务,它可能有一些高可用性要求,这意味着它无论如何都不能在单个服务器上运行。

I would imagine that the primary concern when building a high-scale application is the experience of the engineers on your team, including operations engineers. By all means consider performance when selecting a platform, but the experience and preference of your development and operations engineers is probably more important - after all, they will need to maintain and operate the service respectively.

In any case, if you have a real need for a service with 2000 concurrent clients, it probably has some high availability requirement which means it can't be run on a single server anyway.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文