网络服务器应用程序的负载测试策略
我正在构建一个 Windows 服务,该服务侦听 TCP 上的连接,一旦建立连接,就会发送稳定的数据流。这非常简单......一旦发出初始请求,通信就是单向的(当然是在应用程序层上)。
在高负载(例如最多 3,000 个并发连接)下测试此功能的好方法是什么?是否有针对此类事情的标准工具,或者我应该编写自己的工具?
I am building a Windows service that listens for connections over TCP and, once a connection is established, sends a steady stream of data. It is very simple... once the initial request is made, the communication is one-way (on the application layer, of course).
What is a good way to test this with significant load, say up to 3,000 simultaneous connections? Are there standard tools for this kind of thing, or should I just write my own?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我感觉您已经编写了自己的协议,所以我认为您必须坚持实现自己的负载测试客户端。
为这样的事情编写一个负载测试客户端并不难。我唯一建议的是认真考虑是否要在一台物理机或多台物理机上测试连接。我并不是说您应该在 3,000 台物理机器上进行测试,但 10 或 20 台机器会是一个好主意。否则,客户端机器很可能成为瓶颈。
另外,要真正测试服务器,您必须有一个良好的负载测试实现。如果您看到负载测试器的处理器使用率保持在 100%,则说明您没有测试服务器;而是在测试服务器。你正在测试客户端。
I have the feeling you have written your own protocol, so I think you're like stuck to implementing your own load testing client.
Writing a load testing client for something like this isn't hard. The only thing I would advise though is to really think about whether you're going to test on a connection from one physical machine or multiple. I'm not saying you should test from 3,000 physical machines, but something like 10 or 20 machines would be a good idea. Otherwise you have a good chance the client machine being the bottleneck.
Also, to really test the server, you have to have a good load test implementation. If you see the processor usage of your load tester staying at 100%, you're not testing the server; you're testing the client.