需要专家对 .net 应用程序最快通信的评论

发布于 2024-09-25 17:57:36 字数 296 浏览 3 评论 0原文

我希望在多个服务器之间实现最快且可扩展的通信。我为此目的开发了一个自定义 TCP 套接字服务器 (IOCP),因为我认为这将是 .NET 中最快的通信,但我不知道它是否会在高负载时崩溃,或者我的解决方案是否是 .NET 应用程序最快的通信通道。有没有开源解决方案可以满足我的需求?

.NET 应用程序中最快、可扩展、可靠的通信渠道是什么?

I am looking to achieve the fastest and scalable communication between several servers. I've developed a custom TCP socket server for this purpose with (IOCP) as I think it would be the fastest communication in .NET, but I don't know if it crashes on high load, or if my solution is the fastest communication channel for .NET applications. Is there any open source solution out there to meet my needs?

What's the fastest, scalable, reliable communication channel in .NET Applications?

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

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

发布评论

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

评论(2

养猫人 2024-10-02 17:57:36

有很多很多因素会影响网络应用程序的性能,从架构设计决策、协议选择、网络拥塞,一直到消息序列化、内存分配等。不存在“一刀切”的网络通信方式这使得应用程序可以自动扩展,在高负载下健壮等等。

较低级别的协议具有较少的开销,这是正确的。但对于某些用例来说,更高级别的协议可能会更好,因为它们已经提供了一些功能,否则您必须自己实现这些功能。而且,正如我所说,协议并不是影响性能的唯一因素。

您需要收集您的需求,识别瓶颈,设计适当的架构,选择正确抽象级别的协议,以及配置文件、配置文件、配置文件。

There are many, many things that impact the performance of a network application, beginning with architectural design decisions, protocol choice, network congestion, down to message serialization, memory allocations, etc. There is no "one size fits all" way of network communication that makes an application automatically scalable, robust under high load, etc.

Lower level protocols have less overhead, that is right. But higher level protocols may be much better for some use cases, because they already provide some features which you otherwise would have to implement yourself. And, as I said, the protocol is not the only thing that affects the performance.

You need to gather your requirement, identify the bottlenecks, design an appropriate architecture, choose a protocol at the right abstraction level, and profile, profile, profile.

那请放手 2024-10-02 17:57:36

我希望运行专门针对您的特定需求量身定制的自定义协议的自定义 TCP 或 UDP 服务器将是最有效的解决方案,但由于您并没有真正告诉我们太多有关您需要通信的内容,因此很难回答。

当然,解决方案还取决于您喜欢什么技术;编写可扩展的 TCP 服务器很困难,您需要在开发的各个阶段使用实际数量的测试客户端和模拟数据流等来分析您的解决方案。编写自定义的可靠或半可靠的 UDP 协议甚至更难

。 “不太快”的解决方案就可以,并且更容易实施,因为其他人会为您完成所有艰苦的工作。同样,了解的唯一方法是分析类似于问题的实际表示的内容。

I would expect that a custom TCP or UDP server running a custom protocol that is ideally tailored for your particular needs would be the most efficient solution but since you're not really telling us much about WHAT you need to communicate it's rather difficult to answer.

Of course the solution also depends on what technologies you're comfortable with; writing scalable TCP servers is hard and you need to profile your solution at all stages of development with a realistic number of test clients and simulated data flow, etc. Writing custom reliable or semi reliable UDP protocols is even harder

It may well be that a 'less fast' solution will do and will be easier to implement as someone else will have done all of the hard work for you. Again the only way to know is to profile something that resembles a realistic representation of your problem.

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