close
to english version

The requested page is available in English only. We are working to translate more pages. We appreciate your understanding.

Back to News

Latencies between AWS availability zones. What are they? And how to minimize them?

March 27, 2023

Spreading your application’s infrastructure across availability zones enables fault isolation and protection against major outages and local disasters. However, since there are considerable distances between AZs, there are also additional latencies compared to pairs of resources located within the same AZ. But how much is that latency and what can we do to minimize it?

For many applications the extra latency will not matter but there are crucial exceptions. At FlashGrid, we build Oracle RAC database clusters which serve various mission critical applications and some handle high-performance transactions that are latency sensitive. Having synchronous replication or data mirroring is an indication that your application may be latency sensitive too. If this is the case with your application and a 0.5 ms vs 1.5 ms latency makes a difference, read on!

The main point of this article is to highlight that different AZ pairs have different latencies between them and share with you the data we’ve gathered. Because if you really need to optimize for latency, then it is good to know what options you have.

In the example below you can see the significant differences in latencies between AZs in the us-west-2 region (that has four AZs). The latency between each AZ is represented by the distance between them. In this case, usw2-az1 and usw2-az3 have the lowest inter-AZ latency.

Latencies between AWS availability zones

We have measured latencies in all “physical” AZ pairs of all regions and included the data below for your reference. But before you start using the data, make sure that you understand how “logical” AZs are mapped to the “physical” AZs.

Mapping AWS ZoneName to ZoneID

For each account, AWS maps physical Availability Zones randomly to each Availability Zone name. This is how AWS tries to distribute resources evenly across Availability Zones and avoids them being concentrated in just one. As such, us-east-1a in your AWS account could be in a different physical AZ to us-east-1a for another account. For example:

Mapping AWS ZoneName to ZoneID

Account 1111-1111-1111 has us-east-1a mapped to use1-az1 but account 2222-2222-2222 has us-east-1c mapped with use1-az1.

You can find out how your account is mapped in the Service Health section of the AWS EC2 Dashboard for each region. It will look something like this:

the Service Health section of the AWS EC2 Dashboard for each region

Another way to do find out how your account is mapped is to run the following query in the AWS CLI:

% aws ec2 describe-availability-zones --output json --region us-west-2 | jq '.AvailabilityZones[] | "\(.ZoneName),\(.ZoneId)"'
"us-west-2a,usw2-az2"
"us-west-2b,usw2-az1"
"us-west-2c,usw2-az3"
"us-west-2d,usw2-az4"

With this information in hand, and if you were using FlashGrid, you could easily adjust the location the nodes by entering the corresponding letter in the FlashGrid Launcher, as shown below:

Cluster Nodes

However, whether you’re using FlashGrid, Data Guard, or something else, it may be helpful to create a reference table to keep track of what is hosted where, like so:

NodePhysical ZoneIDLogical AZ name
racdb1usw2-az1us-west-2b
racdb2usw2-az3us-west-2c
quorumusw2-az4us-west-2d

If you have any questions or found this information useful, we’d love to hear from you. Feel free to get in touch via LinkedIn, Facebook, or our contact form.

Inter-AZ latencies by region

af-south-1

afs1-az1   afs1-az2 = 0.752ms
afs1-az1   afs1-az3 = 0.506ms
afs1-az2   afs1-az3 = 0.575ms

ap-east-1

ape1-az1   ape1-az2 = 0.443ms
ape1-az1   ape1-az3 = 0.639ms
ape1-az2   ape1-az3 = 0.660ms

ap-northeast-2

apne2-az1   apne2-az2 = 0.715ms
apne2-az1   apne2-az3 = 0.990ms
apne2-az1   apne2-az4 = 0.791ms
apne2-az2   apne2-az3 = 1.167ms
apne2-az2   apne2-az4 = 0.925ms
apne2-az3   apne2-az4 = 0.608ms

ap-northeast-3

apne3-az1   apne3-az2 = 0.293ms
apne3-az3   apne3-az1 = 0.690ms
apne3-az3   apne3-az2 = 0.681ms

ap-south-1

aps1-az1   aps1-az2 = 0.329ms
aps1-az1   aps1-az3 = 0.496ms
aps1-az3   aps1-az2 = 0.674ms

ap-south-2

aps2-az1   aps2-az2 = 0.933ms
aps2-az1   aps2-az3 = 0.487ms
aps2-az2   aps2-az3 = 1.237ms

ap-southeast-1

apse1-az1   apse1-az2 = 0.745ms
apse1-az1   apse1-az3 = 0.659ms
apse1-az2   apse1-az3 = 0.454ms

ap-southeast-2

apse2-az1   apse2-az2 = 0.849ms
apse2-az3   apse2-az1 = 0.711ms
apse2-az3   apse2-az2 = 0.993ms

ap-southeast-3

apse3-az1   apse3-az2 = 0.664ms
apse3-az1   apse3-az3 = 0.456ms
apse3-az2   apse3-az3 = 0.414ms

ap-southeast-4

apse4-az1   apse4-az2 = 0.709ms
apse4-az1   apse4-az3 = 0.292ms
apse4-az2   apse4-az3 = 0.548ms

ca-central-1

cac1-az1   cac1-az2 = 0.409ms
cac1-az1   cac1-az4 = 0.907ms
cac1-az2   cac1-az4 = 1.167ms

eu-central-1

euc1-az2   euc1-az1 = 0.856ms
euc1-az2   euc1-az3 = 0.843ms
euc1-az3   euc1-az1 = 0.647ms

eu-central-2

euc2-az1   euc2-az2 = 1.135ms
euc2-az1   euc2-az3 = 0.678ms
euc2-az2   euc2-az3 = 0.698ms

eu-north-1

eun1-az1   eun1-az2 = 1.143ms
eun1-az1   eun1-az3 = 0.995ms
eun1-az2   eun1-az3 = 1.466ms

eu-south-1

eus1-az1   eus1-az2 = 1.036ms
eus1-az1   eus1-az3 = 0.562ms
eus1-az2   eus1-az3 = 1.175ms

eu-south-2

eus2-az1   eus2-az2 = 1.008ms
eus2-az1   eus2-az3 = 0.973ms
eus2-az2   eus2-az3 = 1.151ms

eu-west-1

euw1-az1   euw1-az2 = 0.744ms
euw1-az3   euw1-az1 = 0.837ms
euw1-az3   euw1-az2 = 0.402ms

eu-west-2

euw2-az2   euw2-az1 = 0.583ms
euw2-az2   euw2-az3 = 0.717ms
euw2-az3   euw2-az1 = 1.018ms

eu-west-3

euw3-az1   euw3-az2 = 1.030ms
euw3-az1   euw3-az3 = 0.895ms
euw3-az2   euw3-az3 = 1.003ms

me-central-1

mec1-az1   mec1-az2 = 0.903ms
mec1-az1   mec1-az3 = 1.843ms
mec1-az2   mec1-az3 = 1.135ms

me-south-1

mes1-az1   mes1-az2 = 0.442ms
mes1-az1   mes1-az3 = 0.397ms
mes1-az2   mes1-az3 = 0.392ms

sa-east-1

sae1-az1   sae1-az2 = 2.381ms
sae1-az1   sae1-az3 = 0.920ms
sae1-az2   sae1-az3 = 1.202ms

us-east-1

use1-az1   use1-az2 = 0.726ms
use1-az1   use1-az3 = 0.964ms
use1-az1   use1-az4 = 0.742ms
use1-az1   use1-az5 = 0.585ms
use1-az2   use1-az3 = 0.914ms
use1-az2   use1-az4 = 0.528ms
use1-az2   use1-az5 = 0.593ms
use1-az3   use1-az5 = 0.856ms
use1-az4   use1-az3 = 0.970ms
use1-az4   use1-az5 = 0.667ms
use1-az6   use1-az1 = 0.922ms
use1-az6   use1-az2 = 0.983ms
use1-az6   use1-az3 = 0.595ms
use1-az6   use1-az4 = 1.066ms
use1-az6   use1-az5 = 0.917ms

us-east-2

use2-az1   use2-az2 = 0.756ms
use2-az1   use2-az3 = 1.060ms
use2-az2   use2-az3 = 0.380ms

us-west-1

usw1-az3   usw1-az1 = 0.958ms

us-west-2

usw2-az1   usw2-az3 = 0.295ms
usw2-az1   usw2-az4 = 0.603ms
usw2-az2   usw2-az1 = 0.653ms
usw2-az2   usw2-az3 = 0.895ms
usw2-az2   usw2-az4 = 0.468ms
usw2-az3   usw2-az4 = 0.568ms

Icon

Contact Us

Icon