Score:0

Which available zone should I choose when launching an EC2 instance?

cn flag

I have checked https://www.parkmycloud.com/blog/aws-regions-and-availability-zones/ and https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-availability-zones. It is easy to choose a region close to my customers. However, how about the available zone?

Which available zone should I choose when launching an EC2 instance to obtain the best performance? For example, I want to launch an EC2 instance in us-east-1, and then add Cloudfront with Origin shield at us-east1, which available zone should I choose? There are 6 of them. Both articles above do not describe how to choose the available zone.

I notice that in https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-availability-zones, it said us-east-1a in one account may have the same availalize zone with us-east-1b in another account. Does that mean it is better to let Amazon allocate AZ for me instead of choosing one manually?

Score:3
cn flag

The AWS page literally does say what to choose. Bold text highlighted by me.

When you launch your initial instances, we recommend that you accept the default Availability Zone, because this allows us to select the best Availability Zone for you based on system health and available capacity. If you launch additional instances, specify a Zone only if your new instances must be close to, or separated from, your running instances.

Thus, I feel you're missing some core concepts here. The AZs are all (effectively) the same within a region. You should be writing your app to be able to use any zones within a region if there's a failure within a zone. From the 3rd sentence of the AWS page you linked:

If you distribute your instances across multiple Availability Zones and one instance fails, you can design your application so that an instance in another Availability Zone can handle requests.

alancc avatar
cn flag
Thank you very much. I overlook the most important part.
Score:2
gp flag
Tim

It generally doesn't matter which availability zone you choose. Performance and price is the same in each AZ in a region. In some regions some specialty instance types aren't available in every AZ, but that's rare.

AZs let you deploy highly available applications. This is something you could consider as your knowledge of AWS improves. Also make sure you set up backups - EBS snapshots are the easiest way, which you can automate in the EC2 console using Lifecycle Manager.

alancc avatar
cn flag
Thank you for letting me know about EBS snapshots.
Tim avatar
gp flag
Tim
Welcome. Link added. We see a lot of cases where backups would've saved a lot of hassle. AWS is a complex enterprise platform, some training is really necessary if you're using it for anything important.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.