我一直在給定負載的測試軟件我的團隊設計和製造任務尋找幫助。它是一個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