title: Looking for help in designing load tests
body: <p>I've been given the task of load testing the software my team designs and builds. It is a Java web app that acts as an API to all the other applications my company makes. </p>
  
  <p>This is a rough outline of the system:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>This is a very low level view as there are a lot of instances of each app that is publishing to and consuming the queue. </p>
  
  <p>I've never load tested anything before so I'm new to the concepts and tools available. </p>
  
  <p>Right now I'm using jMeter to initiate the calls and consume the replies (and I have it operating just like App 1 in the examples, it calls via rabbit and consumes the replies). </p>
  
  <p>Here are my questions:</p>
  
  <pre><code>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. 
  </code></pre>
  
  <p>My plan was:</p>
  
  <pre><code>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.
  </code></pre>
  
  <p>I was thinking that by doing this I can figure out what the maximum rate we can publish to the queue while still being within an acceptable error rate and  an idea of what the turnaround time will be. </p>
  
  <p>Is there anything else I should be looking for? Any "rules" of load testing I should know about in order to be successful in this?</p>
  
  <p>Thanks!</p>