AlarmClockContinuing our fascinating series (sic) of Amazon Web Services related latency measurements…we’ve already looked at the round trip time between the UK and the US vs the EU region, so now our attention has turned to the latency between availability zones (AZs) in the EU region.

The network latency between AZs is critical to designing and implementing fault tolerant applications on AWS, as the design assumption is that synchronous transactional data replication is always feasible, and you can seamless fail over from one Relational Database Node (RDS) node to another “standby” replica in another AZ etc. So we thought we’d measure it!

One of my colleagues collected some measurements between 4 x Linux t1.micro instances (2 running apache & 2 running http-ping scripts) between EU zones. The scripts were scheduled to run every 5 mins (via cron) with each executing 20 x http-ping requests and returning the average response time in milliseconds. We also measured the latency of the http-ping requests via both the private and public addresses of the corresponding web server.

As a control measure, we also measured the average latency for “localhost” to respond, to allow us to eliminate the web server response time from the measurements. This worked out to be as follows:

  • Roundtrip to localhost – round-trip min/avg/max = 0.9/1.0/1.3 ms
  • Roundtrip to a public IP in the same AZ – round-trip min/avg/max = 1.3/1.4/2.7 ms

And here are the results of measurements across the AZs – first for the private IP addresses (click the image to view in full size):

PrivateIPLatencyHiRes

…and for the public IP addresses:

PublicIPLatencyHiRes

So in summary, the roundtrip between AZs using public IP addresses works out to be about 4ms minimum, and once you take off the minimum 1.3ms experienced between public IPs in the same AZ, and dividing by 2 (as it’s a roundtrip), then the latency between AZs in the EU region works out to be about 1.35ms minimum. Pretty quick really…

Imagine that you want to deploy some components entirely within one Amazon Web Services (AWS) region – which region should you choose? Well, US-East is cheaper than EU-West (e.g. by 11.8% for the smaller on-demand instances), so that’s quite attractive – if your deployment is not tied for legal reasons to a European deployment. Obviously for most UK-centric organisations, the US is further away (!) and so network latencies should be greater…but are they? It seems obvious but before we ruled out a potential 10%+ saving for our customers, we thought we’d do some measurements.

And the answer is…

us-east-1d, average round trip time = 231ms

eu-west-1a, average round trip time = 96ms

This was based upon using http-ping to check the average round trip time of HTTP requests from our Ipswich development centre in the UK. So phew, the laws of physics still hold true even in a cloud world :)

Follow

Get every new post delivered to your Inbox.

Join 801 other followers