SignalR 在高负载下失败

发布于 2024-12-24 02:56:55 字数 1067 浏览 1 评论 0原文

我有一个负载非常高的网站,并将我的测试应用程序保存在隐藏的 iframe 下,以确保目标框架是我的用例的不错选择。首先尝试 SignalR 测试应用程序,然后在同一服务器配置下尝试 Pokein。目前我们正在使用 Flash 远程处理解决方案,但很快我们计划对其进行更改。

我花了一些时间来制作基于 SignalR 的测试应用程序,以在网站高负载下处理并发客户端更新。它在这种情况下工作得很好(一些客户端请求消息)..当大多数连接的客户端同时请求消息时,它急剧失败(我需要将其从 iframe 调用中删除)..我曾怀疑我的服务器配置有问题,但相同的场景在其他付费解决方案 Pokein 下工作没有任何问题。

有什么我忘记的技巧吗?

2012 年 2 月 10 日更新: 虽然我们决定在我们的解决方案中实现 PokeIn,但我在 Github 上尝试了最新的 SignalR 代码(可能对其他人有帮助)..结果是相同的。

2012年3月13日更新: 场景:(再来一次) -尝试在给定的时间间隔(例如1秒)内向数千个连接的客户端发送消息。测试并查看结果并不难。我觉得,我是唯一一个强调此类非常常见用法的库的人。

详细信息(如何重现 - 使用来自 Github 的 0.5 进行测试) - 服务器 2008 R2 32GB DDR3、i7-2600 3.4Ghz、2x256 GB Crucial M4 - ASP.NET 3.5

  • 单页应用程序。每秒从服务器更新客户端的时间
  • 此页面嵌入到由多个网站加载的隐藏 iframe 中,以便进行实际负载测试。

  • 问题

    • 系统在某个时刻锁定(大约 800 个用户),并且大多数客户端无法从服务器获取更新的时间

    • 系统锁定后,该单个应用页面将停止响应

我还尝试将间隔增加到 5 秒。这次系统响应更快(大约 950 个用户),但结果是一样的。我在 .NET 2 和 .NET 4 应用程序池上尝试过此操作。

希望这些细节已经足够了。重复这个测试对我来说非常容易,一旦我找到空闲时间,我就会在未来的版本中重复这个测试。

I have a website with very high load and keeping my test app under a hidden iframe to make sure that the target framework is a good choice for my use case. First tried SignalR test app and then Pokein under same server config. Currently we are using Flash remoting solutions but soon we are planning to change it.

I spent some time to make my SignalR based test application to handle concurrent client updating under the high load of my website. It was working good under the scenario (some of the clients requests for message).. when most of the connected clients request for the messages at the same time, it failed dramatically (I needed to remove it from the iframe call).. I had suspected my server configuration is the problem but the same scenario work under other paid solution Pokein without any issue.

Is there any trick i forget?

Feb.10.2012 Update:
Although we decided to implement PokeIn into our solution, I tried the latest SignalR code on Github (might be helpful for others).. and the result is the same.

March.13.2012 Update:
Scenario: (One more time)
-Try to send a message to the thousands of connected clients under a given interval lets say (1 sec). It won't be hard to test and see the result. I feel like, i am the only person around stressing the libraries for this type of very common usage.

Details (How to reproduce - tested with 0.5 from Github)
- Server 2008 R2 32GB DDR3, i7-2600 3.4Ghz, 2x256 GB Crucial M4
- ASP.NET 3.5

  • Single page app. updates the time on the client side from the server every seconds
  • This page is embedded into a hidden iframe loaded by several web sites in order make a real life load test.

  • Issues

    • System locks at some point ( approx 800 users) and most of the clients doesn't get the updated time from server

    • Once the system locks, that single app page stops responding

I also tried to increase the interval to 5 secs. This time the system was more responsive (approx. 950 users) but the result was same. I tried this on .NET 2 and .NET 4 application pools.

Hope these details are enough. Repeating this test is quite easy for me and as soon as i found a free time, i will repeat the test with future version.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文