QA
Beginner LevelCloud Computing (AWS/GCP/Azure)

What is the difference between AWS RDS Multi-AZ deployments and Read Replicas?

❓ Interview Prompt: Compare AWS RDS Multi-AZ High Availability (synchronous) vs Read Replicas (asynchronous read scaling).

Amazon Relational Database Service (RDS) provides two distinct mechanisms for database scaling and resilience:

1. RDS Multi-AZ (High Availability & Disaster Recovery):

•
Mechanism: Synchronously replicates database writes to a Standby instance in a different Availability Zone.
•
Purpose: Automatic failover. If the Primary DB crashes, RDS automatically switches DNS to the Standby in ~60 seconds with zero data loss.
•
Note: The Standby instance cannot serve read queries; it is strictly a passive failover target.

2. RDS Read Replicas (Read Performance Scaling):

•
Mechanism: Asynchronously replicates data to up to 15 Read Replica instances.
•
Purpose: Offloads heavy read traffic ('SELECT' queries) from the primary database.
•
Note: Read Replicas can serve active application queries and can span across multiple AWS regions.

Code Implementation Example

typescript
// Express DB Connection Pooling separating Write Primary from Read Replicas
import { Pool } from 'pg';

const primaryDb = new Pool({ host: 'db-primary.company.com' }); // Multi-AZ Primary (Writes)
const readReplicaDb = new Pool({ host: 'db-read.company.com' }); // Read Replica (Reads)

async function getProductCatalog() {
  // Direct SELECT queries to Read Replica to offload Primary DB!
  const res = await readReplicaDb.query('SELECT * FROM products');
  return res.rows;
}
💡Directing read queries to RDS Read Replicas to offload Primary DB.
🎯 Interview Key Takeaway

Multi-AZ provides synchronous failover for high availability; Read Replicas provide asynchronous read scaling.

#RDS#Multi-AZ#Read Replicas#Databases#Beginner
Back to all Cloud Computing (AWS/GCP/Azure) Questions→

More Cloud Computing (AWS/GCP/Azure) Interview Questions

Beginner LevelCloud Computing (AWS/GCP/Azure)

How does Serverless Architecture (AWS Lambda / GCP Cloud Run) handle Auto-Scaling and Cold Starts?

Beginner LevelCloud Computing (AWS/GCP/Azure)

What is the difference between IaaS, PaaS, and SaaS cloud service models?

Beginner LevelCloud Computing (AWS/GCP/Azure)

What is AWS EC2 and what are On-Demand, Reserved, and Spot Instance pricing models?