title: Performance of separate application and database servers vs all-in-one
body: <p>We are migrating an existing application that requires a decent database setup. We've run a simple mysqlslap test on two server configurations - combined app &amp; db server, separate app &amp; 2 db servers (master/slave):</p>
  
  <p><code>mysqlslap --auto-generate-sql --concurrency=50 --number-of-queries=1000 --number-char-cols=50 --number-int-cols=50 -vv</code></p>
  
  <ul>
  <li>Result for separate servers is slower even though it is using the same instance size and being run from the db server.</li>
  <li>In another test, using microtime &amp; looping over a query, - there is a significant latency between the servers. Examples: test 1 is 0.01 seconds on combined and 0.1 on separate, and 0.2 (combined) compared to 3.0 (separate).</li>
  </ul>
  
  <p>My questions:</p>
  
  <ol>
  <li>Are these expected results?</li>
  <li>Is there a way to minimize the latency between the servers?</li>
  <li>We are not able to use sysbench to match against the existing server - are the tests we've performed satisfactory or are there better alternatives?</li>
  </ol>