如何在真实条件下模拟 Web 应用程序的 120 个并发用户? [英] How to simulate 120 concurrent users of a web application with real conditions?

查看:18
本文介绍了如何在真实条件下模拟 Web 应用程序的 120 个并发用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用负载测试框架(例如 JMeter)模拟 > 120 个并发用户?据我所知,如果我使用 120 个服务器或 120 个 CPU 内核,那么真正的并发是可能的.

How to you simulate > 120 concurrent users using a Load Test Framework such as JMeter? Real concurrency, as far as I understand, would be possible if I would use 120 servers or 120 CPU cores.

您如何/是否在真实条件下测试您的网络应用程序或服务?

How did/do you test your web application or service with real conditions?

推荐答案

我发现 JMeter 工作正常,但我通常使用 4-5 台 PC 以获得最准确的结果.

I have found JMeter to work fine, but I generally use is across 4-5 PC's to get the most accurate results.

虽然您可能认为从一台 PC 上模拟 120 个并发用户可能很难,但您必须意识到,在实际工作场景中,120 个并发用户不会完全同时访问服务器,因此 CPU 线程算法足以模拟负载.

Although you may believe 120 concurrent users may be difficult to simulate from a single PC, you have to realise that in a real work scenario, 120 simultaneous users will not be accessing the server at exactly the same time, therefore the CPU threading algorithms are sufficient to simulate the load.

您需要做的是了解您的用户对您的应用程序的可能使用情况,即您每秒/分钟将从单个用户那里获得多少请求,并确保您的测试有效地模拟了这一点.

What you need to do is to understand the likely usage of your application from your users, i.e. how many requests per second/minute you will get from a single user and make sure that your test simulates this effectively.

因此,我们的技术是在运行不同测试的 5 台 PC 上使用 JMeter,并在测试期间监控服务器性能.

So, our technique is to use JMeter running on 5 PCs running different tests, and to monitor the server performance during the tests.

当然,还有许多其他产品的价格能够更好地模拟网络流量,但我一直发现 JMeter 非常适合我的需求.

There are of course many other products available that for a price are able to better simulate web traffic, but I have always found JMeter to be perfectly good for my needs.

这篇关于如何在真实条件下模拟 Web 应用程序的 120 个并发用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆