彗星应用程序基准测试
我目前正在写硕士论文。这是关于实时网络应用程序的。 现在我想将 Node.js 与长轮询进行比较。
我知道一些基准测试工具,例如 ab、autobench 等,但这些并不能真正测试应用程序。一旦他们向服务器发出请求,该请求就会被处理并发出新的请求。我需要的是一个能够在网页上“停留”更长时间的基准测试工具,这样它就能模拟真人。
例如:我用 Node.js 和长轮询 (PHP) 做了一个演示聊天。现在我想用 100 个并发用户进行测试,并且聊天时间大约为 30 秒。
有人对我如何实现这个目标有一些建议吗?
我先谢谢你了!
I'm currenctly working on my master's thesis. It's about real-time webapplications.
Now I'd like to compare Node.js with for example long polling.
I know some benchmarking tools such as ab, autobench etc., but these don't really test the application. Once they've made a request to the server, the request is handled and a new request is made. What I need is a benchmarking tool that will 'stay' on the webpage for a longer time so it'll simulate real people.
For example: I've made a demo chat in both Node.js and long polling (PHP). Now I want to test this with 100 simultaneous that stay on the chat for about 30 seconds.
Does anyone has some suggestions for me how I can reach this goal?
I thank you in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
长轮询本身是一种与平台无关的 Web 推送技术,因此您可以将用 Node.js 制作的长轮询应用程序与用 PHP 制作的类似应用程序进行比较。
您可以创建另一个服务器应用程序来模拟客户端连接,但是该应用程序不应与长轮询服务器应用程序托管在同一台计算机上,以便在客户端和服务器之间具有“接近真实”的延迟。即使这种方法也可能无法为您提供与“真人”客户端相同的确切环境(因为模拟客户端连接的服务器应用程序将位于同一源,并且还因为著名的引用“没有像生产这样的测试”< /em>),但它可以为您提供粗糙的环境来测试长轮询服务器以收集一些基准数据。例如socket.io就有这种应用用于模拟各种浏览器运输。
Long polling itself is a platform agnostic web push technology, so you can compare long polling application made in node.js with similar application made in PHP for example.
You can create another server application which would simulate client connections, however this application shouldn't be hosted on the same machine as your long poll server application in order to have "near real" latency between clients and server. Even this approach may not give you exact environment as you would have with "real human" clients (since server application simulating client connection would be on the same origin and also because of famous quote "there is no test like production"), but it can give you rough environment to test your long polling server to gather some benchmark data. For example socket.io has this kind of application for simulation of a variety of browser transports.