Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between "Multi-AZ Deployment" and "Read Replica Verison Multi-AZ Deployment"

Summary

Amazon RDS has two main different types of replicas, Multi-AZ Replica and Read Replica, and it's easily to find their difference.

However, Read Replica had supported Multi-AZ deployment at JAN, 2018.

What is the main difference between "Multi-AZ Deployment" and "Read Replica Version Multi-AZ Deployment"?

The two ways to add the Multi-AZ Deployment at the current database are as follow:

Situation 1: (Original, Multi-AZ Deployment)

Instance Action
→ Modify
→ specified the "Multi-AZ deployment" option

Situation 2: (Read Replica Version Multi-AZ Deployment)

Instance Action
→ Create read replica
→ specified the "Multi-AZ deployment" option

like image 846
Chumicat Avatar asked Nov 09 '19 12:11

Chumicat


Video Answer


1 Answers

An RDS read replica instance is an asynchronous read-only replica of an upstream primary ("master") database instance. It can be used by your application for any query that does not require changing data, thus relieving load from the master. If the replica crashes or fails, it has no impact on the master but the replica itself can no longer handle any traffic.

Multi-AZ means the database instance has a standby spare server machine and spare hard drive in a different availability zone of the same region. This is a synchronous replica, but cannot be accessed by you. If the active server fails, the spare server takes over and starts handling traffic more quickly than would be possible without the spare.

Multi-AZ is a deployment strategy for higher reliability. It reduces the downtime required for version upgrades, and reduces the impact of backup snapshots and creation of replicas, since snapshots can be done from the spare (by the service). It doubles the cost of the instance because of the hot standby capacity it provides.

Multi-AZ typically used only on the master instance, for fast recovery.

Historically, this was the only variant of Multi-AZ, but a Multi-AZ read replica is now possible, and is what it sounds like: a replica with Multi-AZ. It will recover more quickly from faults and failures because it has spare hardware. The active and spare are synchronous replicas of each other but are still asynchronous replicas of the master, as all non-Aurora replicas are in RDS/MySQL.

Combining Read Replicas with Multi-AZ enables you to build a resilient disaster recovery strategy and simplify your database engine upgrade process.

Amazon RDS Read Replicas enable you to create one or more read-only copies of your database instance within the same AWS Region or in a different AWS Region. Updates made to the source database are then asynchronously copied to your Read Replicas. In addition to providing scalability for read-heavy workloads, Read Replicas can be promoted to become a standalone database instance when needed.

https://aws.amazon.com/about-aws/whats-new/2018/01/amazon-rds-read-replicas-now-support-multi-az-deployments/

In summary, Multi-AZ on the master gets you one server with an invisible hot spare that is used for failure recovery but is not a usable database replica. It is a good strategy for resiliency.

Multi-AZ on a replica is an expensive way of speeding recovery time on a crashed instance. It is a separate server, so can be accessed by you, but so can a non-Multi-AZ read replica.

like image 141
Michael - sqlbot Avatar answered Sep 28 '22 02:09

Michael - sqlbot