title: How significant is the effect of network latency in Amazon Web Services between EC2 and RDS instances, especially for Magento?
body: <p>Please keep in mind I have very little experience with any of this stuff.</p>
  
  <p>I've been trying to set up a multi-server Magento site in Elastic Beanstalk, using RDS as the database and EC2s for the separate admin and frontend servers. I was testing the speed of a few different setups on tools.pingdom.com, mostly looking at what they call "wait" (DNS, connect, send, WAIT, receive), assuming that is a rough measure of how long it takes for Magento to generate the html for a page. I was puzzled by how on different setups, the wait time could vary so dramatically for creating roughly the same page using similar server instances. I was getting values between 980ms and 1.8s.</p>
  
  <p>I thought I started to notice a pattern. It seemed that the setups in which the EC2s were in the same availability zones as the RDS instances would be faster and more consistently faster. So I changed the elastic beanstalk configurations so that the EC2s would be in the same zone as the database. My unscientific findings were that I would consistently get wait times of around 1s after this change. It seems to me that the fairly significant differences in speed were due to network latency between the application server and the database.</p>
  
  <p>There are three parts to my question. First, is this what one would expect from keeping instances in the same zones, or am I reading too much into a small set of test results? Second, is this a significant real world difference in speed? Because it seems to be to me, and it also seems that it would only be made worse by using things like NFS to share the media folders. Third, are there any advantages to allowing application servers to be launched in different zones, and are those advantages worth the increase in wait time?</p>
  
  <p>Also, if I'm doing something wrong, please tell me.</p>