我一直在给定负载的测试软件我的团队设计和制造任务寻找帮助。它是一个Java Web应用程序,它充当我公司所有其他应用程序的API。在设计负载测试
这是系统的一个大致的轮廓:
1) Application 1 needs information from the database.
2) App 1 produces a request to a rabbit exchange (routing key for the queue that is consumed by the tool I'm testing).
3) My tool consumes the RabbitMQ queue that App1 pushed to
4) My tool executes the request sent from App1 via the Rabbit queue
5) My tool then sends the response back to App 1 via a Rabbit Exchange/Reply Queue.
6) App 1 then consumes from the reply queue and handles the response
这是一个非常低的水平视图,也有很多被发布到和消费队列中的每个应用程序的实例。
我从来没有负荷测试,任何事情之前,所以我是新来的可用的概念和工具。
现在我使用JMeter的启动电话和消费的答复(而且我已经在示例的操作,就像应用程序1,它通过调用兔肉和消费的回复)。
这里是我的问题:
1) Is this a viable way to load test? Should I be testing the capacity of the server directly or should I continue going through rabbit since it's a closer to production use case?
2) What is the best way to adjust my rate of production? I've tried doing some throttling via jMeter but when I look at the rabbit graphs the publish rate seems to fluctuate wildly. Example: I tell jMeter to publish at 1000 messages/sec and the graph on the rabbit dashboard goes from 500/sec to 3000/sec. I don't feel like I can accurately get an idea of what we can handle if I can reliably adjust the rate.
我的计划是:
1) Find the rate at which my application can't pick things off the queue fast enough. (where the rate of publishing to the queue becomes faster than my application can consume them).
2) Once I know the fastest I can send stuff to the queue I can check the responses for error rate and processing time.
我在想,通过这样做,我可以找出最大的速度,我们可以发布到队列中,同时还在可接受的错误率范围内以及关于周转时间将会变化的想法。
还有什么我应该寻找?为了在这方面取得成功,我应该了解负载测试的任何“规则”?
谢谢!
负载测试是复杂的,不容易在解剖评论(但没有时间更长的回答)。有一点需要记住,你需要明确你想要展示的目标。您是否试图查看服务器是否可以处理特定的负载(即3000次/秒)或最大值?加载服务器可以处理?如果你瞄准一个目标,但是测试别的东西,你得到的结果将不会让你得出结论(根据收集的数据) – ochi 2014-12-04 00:09:49