Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does AWS RDS Aurora have the option of "Multi-AZ Deployment" when it does replication across different zones already by default?

When launching an Aurora instance I have the option of "Multi-AZ Deployment", which it describes as "Specifies if the DB Instance should have a standby deployed in another Availability Zone."

However the Aurora documentation states that Aurora already automatically spreads the database across different availability zones?

Additionally, what is the difference between an Aurora Multi-AZ standby and an ordinary Aurora replica. Is that that an ordinary replica can be read from increasing performance whereas a standby cannot be read from?

like image 795
Hard worker Avatar asked Aug 12 '15 22:08

Hard worker


People also ask

Is AWS RDS Multi-AZ by default?

By default, the Multi-AZ feature is not enabled for the RDS instance. Open the AWS management console, navigate to databases. In the RDS instance property, we have a property Multi-AZ. Amazon RDS provides two kinds of Multi-AZ deployments for SQL Server.

Why does an Amazon RDS Multi-AZ deployment provide high availability?

Increase availability Use Amazon RDS Multi-AZ synchronous replication technologies to keep data on your standby database instance up to date with the primary. Enhance availability by deploying a standby instance in a second AZ, and achieve fault tolerance in the event of an AZ or database instance failure.

Does Amazon Aurora support multi-AZ?

In the case of Aurora, you can choose to place read replicas across multiple availability zones. Amazon Aurora further extends the benefits of Multi-AZ by employing an SSD-backed virtualized storage layer purpose-built for database workloads.

What is the difference between multi-AZ deployment and Read replicas in RDS?

In Multi-AZ, the data from the primary instance is replicated to a secondary instance. The secondary instance is located in another Availability zone. In Read Replica, a snapshot is taken of the primary database. Read replicas are available in Amazon RDS for MySQL, MariaDB, and PostgreSQL.


2 Answers

Aurora replicates your data across three availability zones, at the storage layer... but the database server instance, itself, is still a virtual machine running on a single physical machine that is located in a single availability zone.

The Aurora storage layer is outside that instance, and is able to let access continue uninterrupted without data loss, even in the event of the loss of up to two AZs, but the loss of the zone containing the db instance will still cause an outage for you, if you only have a single Aurora instance in your cluster (1 master, 0 replicas). Loss of an entire availability zone is one of those things that is highly improbable but not impossible. Your db instance is still a single point of failure when you only have one.

Multi-AZ makes allowance for a complete redundant database instance, in a different AZ, which will automatically take over for the primary within one minute, if it works as designed, in case of the loss of the AZ hosting the primary instance or a catastrophic failure of the primary instance. It's a second virtual machine, on a second physical machine, in a second availability zone. It's always running, but you can't access it. It's in the background, managed and monitored by the RDS infrastructure, but it is only accessible to you in the case of primary instance failure. The secondary machine can also be used to reduce downtime in the event of a software upgrade or maintenance event on the primary. When failover occurs, if you are using DNS to connect to your database (as you should), you'll find that the DNS entry is automatically pointed to the secondary.

Contrast this to a read replica, which is accessible all the time and can thus provide a significant performance benefit, by allowing the offloading of reads. Failing over to a replica involves promoting it to become a standalone master (which permanently detaches it from its own former master) and reconfiguring your application to use the alternate endpoint. This, of course, is still faster than recovering from a failure in the master by using a point-in-time snapshot to create a replacement master instance.

https://aws.amazon.com/rds/details/multi-az/

like image 140
Michael - sqlbot Avatar answered Oct 13 '22 11:10

Michael - sqlbot


Storage in Aurora is replicated across three availability zones. The database head node is a single instance. So, while your data is spread across multiple targets, the head node is not.

When you enable a multi-AZ deployment, we create an Aurora read replica that is available as a failover target. Any Aurora read replicas you create (up to a max of 15 at this time) are also available as failover targets.

There isn't any meaningful difference between Multi-AZ and other Aurora replicas. This is primarily a simplification in the user interface for customers accustomed to using Multi-AZ for other RDS engines.

like image 38
Anurag Gupta Avatar answered Oct 13 '22 10:10

Anurag Gupta