Search code examples
amazon-web-serviceslatencyamazon-vpcaws-regions

AWS latency between Zones within a same Region


I have an EC2 and RDS in the same region US East(N. Virginia) but both resources are in different zones; RDS in us-east-1a and EC2 in us-east-1b.

Now the question is that if I put both resources within the same zone then would it speed up the data transfer to/from DB? I receive daily around 20k-30k entries from app to this instance.

EDIT

I read here that:

Each Availability Zone is isolated, but the Availability Zones in a region are connected through low-latency links.

Now I am wondering if these low-latency links are very minor or should I consider shifting my resources in the same zone to speed up the data transfer?

enter image description here

Conclusion

As discussed in answers and comments:

  • Since I have only one instance of EC2 and RDS, failure of one service in a zone will affect the whole system. So there is no advantage to keeping them in a separate zone.
  • Even though zones are connected together with low-latency links but there is still some latency which is neglectable in my case.
  • There is also a minor data transfer charge of USD 0.01/GB between EC2 and RDS in different zones.

Solution

  • What are typical values for Interzone data transfers in the same region?

    Although AWS will not guarantee, state, or otherwise commit to hard numbers, typical measurments are sub 10 ms, with numbers around 3 ms is what I have seen.

    How does latency affect data transfer throughput?

    The higher the latency the lower the maximum bandwidth. There are a number of factors to consider here. An excellent paper was written by Brad Hedlund.

    Should I worry about latency in AWS networks between zones in the same region?

    Unless you are using the latest instances with very high performance network adapters (10 Gb or higher) I would not worry about it. The benefits of fault tolerance should take precendence except for the most specialized cases.

    For your use case, database transactions, the difference between 1 ms and 10 ms will have minimal impact, if at all, on your transaction performance.

    However, unless you are using multiple EC2 instances in multiple zones, you want your single EC2 instance in the same zone as RDS. If you are in two zones, the failure of either zone brings down your configuration.

    There are times where latency and network bandwidth are very important. For this specialized case, AWS offers placement groups so that the EC2 instances are basically in the same rack close together to minimize latency to the absolute minimum.