5 Differences between Amazon RDS Read Replicas and Multi-AZ
Amazon RDS stands for Relational Database Service. It is a fully managed Database service where you can create and run database instances for your cloud native applications.
It makes our lives easy because the underlying database infrastructure is maintained by the AWS and we can scale whenever required.
There are two features in RDS that are important for you to know - Read Replicas and Multi-AZ.
What is a Read Replica?
sometimes you might be working on applications where the reads are much more frequent than writes (blog websites, newspapers etc).
Or there might be times where you may want to run some analytics on your database, which might slow down the database performance as a whole.
In such cases we may wish to separate the reads from the writes on a database. Read Replica is a read-only database instance that you can create and use in such cases.
You'll create a read-replica instance from your database instance and point your read workloads to this read-only instance. This way all the reads are separated out from the main database instance, improving read performance.
things you must keep in mind -
* data is copied to the read replica asynchronously from the master
* It's a read-only database, you can't write to these instances
* You can deploy a read replica in the same AZ (Availability Zone) or across multiple-AZ
* You can access both the main Database and the Read Replica, but the application tier points to Read Replica for reads.
* Best suited for workloads that need only reads
* no cost for data transfer in read replicas across AZ within the same region, but there are costs for cross region data transfers.
What is a Multi-AZ deployment?
Sometimes you may want to deploy your database instances across multiple Availability Zones, just to make sure that in case any Availability Zone goes down you will still have your database instance running and available.
In such cases, you'll turn on Multi-AZ feature where your database is deployed in multiple Availability Zones instead of in a single place.
You'll use this feature when you're building a resilient and highly available database tier.
things you must keep in mind -
* Data is copied synchronously from the master node to the multi-AZ nodes
* The slave node replaces master node when master is down
* You cannot access these nodes
* Nodes are across multiple AZs, spanning a minimum of 2 AZs.
* You'll generally use Multi-AZ for disaster recovery and High Availability
Conclusion
In production grade application architecture, you'll combine these two - a database cluster that spans across multiple AZs and also has dedicated Read Replica nodes that cater for such periodic analysis jobs or read intensive operations.
I hope this short intro gives you a good understanding of these two.
Subscribe to my Newsletter - https://referbruv.substack.com/