负载测试消费者网站

发布于 2024-09-30 19:42:15 字数 131 浏览 6 评论 0原文

我正在寻找对消费者网站进行负载测试。我尝试过使用JMeter。但是,在这种情况下,所有请求都来自一台计算机。我真正想要的是模拟全国各地的真实用户,一些用户使用低速拨号连接,另一些则使用高速拨号连接。

在这种情况下应遵循哪些最佳实践?

I am looking to load test a consumer website. I have tried using JMeter. However, in that case, all the requests originate from one machine. What I really want is to simulate real users across the country some on low speed dialup connections and others on highspeed.

What are the best practices to follow in such a scenario?

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

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

发布评论

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

评论(3

无可置疑 2024-10-07 19:42:16

JMeter 支持 分布式测试 - 所以如果你已经习惯了它作为一个工具,您也可以使用它来支持来自任意数量的计算机的分布式请求。

请注意,所有计算机都运行完全相同的测试计划,因此您的计划应该有一些快速/慢速环境的随机选择,或者您可以根据某些系统属性选择要使用的配置文件。

JMeter supports distributed testing - so if you're already comfortable with it as a tool, you can use it to power these distributed requests from an arbitrary number of machines, too.

Note that all machines run the exact same test plan, so either your plan should have some random selection of fast/slow environments, or you may be able to select which profile to use based on some system properties.

倾其所爱 2024-10-07 19:42:16

您可能需要考虑使用第三方服务,例如 负载影响

You might want to consider using a 3rd party service such as Load Impact.

岛徒 2024-10-07 19:42:16

您表达了两个不同但相关的问题 - 来自单台计算机的流量和模拟各种最终用户网络速度。

为什么第一个是您的测试所关注的问题?除非您有一个使用 IP 地址作为其负载分配算法一部分的负载均衡器,否则绝大多数服务器(和应用程序平台)并不关心所有流量都来自单个计算机(或 IP 地址)。另请注意,您可以为多个 IP 地址配置负载生成器的操作系统,更好的负载测试工具将利用这些 IP 地址,以便流量来自所有这些 IP 地址。

对于最终用户网络速度的模拟,更好的负载测试工具将为您做到这一点。这可以让您很好地了解带宽如何影响页面加载时间,而无需实际使用分布式负载生成。但工具通常不会考虑延迟。这就是分配负载生成的无可替代的地方。

您可以使用 JMeter 进行分布式测试,尽管它可能有点麻烦。您需要多少个地点?在不了解更多关于您需要什么的情况下,我的第一个建议是选择一个具有专门为您需要的功能而设计的工具。我会改进我们的产品 Web Performance Load Tester,但肯定还有其他选择。 Load Tester 可以模拟各种最终用户连接速度,并内置支持从 Amazon EC2 生成负载(美国东海岸和西海岸以及爱尔兰都柏林......即将推出对亚洲的支持)。设置 EC2 帐户后,您可以在 10 分钟内从云运行第一个测试。

You've expressed two different but related concerns - traffic coming from a single machine and simulating various end-user network speeds.

Why is the first one a concern for your testing? Unless you have a load balancer that uses the IP address as part of its load-distributing algorithm, the vast majority of servers (and application platforms) don't care that all the traffic is coming from a single machine (or IP address). Note also that you can configure the OS of your load generator for multiple IP addresses and the better load-testing tools will make use of those IP addresses so that traffic comes from all of them.

For the simulation of end-user network speeds, again, the better load-testing tools will do this for you. That can give you a pretty good feel for how the bandwidth will affect the page load time, without actually using distributed load generation. But tools frequently do not account for latency. That is where there is no substitute for distributing your load generation.

You can do distributed testing with JMeter, though it can be a bit cumbersome. How many locations do you need? Without knowing more about what you need, my first suggestion would be to choose a tool that has features designed specifically to do what you need. I will pimp our product, Web Performance Load Tester, but there are certainly other options. Load Tester can emulate various end-user connection speeds and has built-in support for generating load from Amazon EC2 (US east and west coast and Dublin, IR...support for Asia coming soon). Once you set up an EC2 account, you can be running your first test from the cloud in 10 minutes.

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