Mobile app version of vmapp.org
Login or Join
Alves908

: Is it better to have AWS EC2 and RDS is the same Availability Zone? I run a web app in an AWS EC2 instance and the database for the app in an RDS instance both in Amazon Web Services

@Alves908

Posted in: #AmazonAws #AmazonEc2 #AmazonRds

I run a web app in an AWS EC2 instance and the database for the app in an RDS instance both in Amazon Web Services Region East-1. However, one of them is in Availability Zone 1a and the other is in 1d. Am I getting all the speed benefits of having both instances in the same "data center" (East-1) even if they are in different Availability Zones, or can I optimize by moving them to the same Availability Zone?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Alves908

1 Comments

Sorted by latest first Latest Oldest Best

 

@Heady270

You should have your website and your database in the same availability zone.


It should be faster
You are less exposed to the risk of an availability zone going down. When you spread your web server and database between two, your website goes down if either of them goes down.


RDS has an option to have a hot spare of the database running in another availability zone. This is called a "Multi-AZ deployment". Similarly you can run a second webserver in another availablility zone and set a load balancer to fail over to it automatically. That would be the correct way to use multiple availability zones and keep your website running even when one goes down.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme