JMeter-负载平衡 [英] JMeter - load balancing
问题描述
在我们的应用程序中,我们有6个应用程序服务器实例.
In our application, We have 6 instance of application server.
当我们手动测试它时,我们将随机降落在某个节点上. 当我运行JMeter测试(有20个用户)时,大部分负载(70%)分配给6个节点中的1个特定节点. 30%的人从其余5人转到另一个特定的节点.
When we test it manually, we will land on some node randomly. When i run our JMeter test (with 20 users), most of the load(70%) goes to 1 specific node out of 6 nodes. 30% goes to another specific node from the rest 5.
我通过请求cookie中设置的JSESSIONID看到了信息.
I see the information via JSESSIONID set in the request cookies.
问题:
我当时认为负载将在所有6个节点上均等地平衡(或多或少). 这是我的申请问题吗?还是与JMeter有关系?
I was thinking the load will be balanced on all the 6 nodes equally (more or less). Is this my application issue? Or Does it have to do anything with JMeter?
注意:
- 我们的应用服务器是JBoss.这是基于Cookie注入的负载平衡.
- 我不通过Cookie将请求发送到任何特定的应用服务器. cookie是自动设置的.
推荐答案
First of all make sure that HTTP Cookie Manager is added to your test plan, it should be enough to automatically resolve cookie-based load balancing problem.
如果您有> 1个负载均衡器实例,或者负载均衡器解析了> 1个IP地址,则可能必须添加 DNS缓存管理器.请参见 DNS缓存管理器:正确的测试方法负载均衡应用指南,以获取更好的解释和配置详细信息.
If you have > 1 load balancer instance or the load balancer resolves in > 1 IP address you may have to add a DNS Cache Manager as well. See The DNS Cache Manager: The Right Way To Test Load Balanced Apps guide for better explanation and configuration details.
这篇关于JMeter-负载平衡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!