Practice Test

True or False: Database replication involves the sharing of data so as to ensure consistency between redundant resources to improve reliability, fault-tolerance, or accessibility.

  • Answer: True

Explanation: Database replication is indeed a technique widely used for the reasons mentioned above. By having multiple replicas of the data, the system is more resilient and can operate better.

In AWS, moving a read replica across regions is not a feature supported by every database.

  • Answer: True

Explanation: It’s true, although you can copy some database snapshots to another AWS region, not all databases support the feature of directly moving read replicas across regions.

Which of the following AWS services supports read replicas? (Select all that apply)

  • A) RDS
  • B) DynamoDB
  • C) Redshift
  • D) S3
  • Answer: A, B, C

Explanation: Amazon RDS, DynamoDB, and Redshift all provide support for read replicas. S3, while it does have redundancy and robustness, does not exactly have a read replica feature.

True or False: Database read replicas can take both read and write queries.

  • Answer: False

Explanation: The purpose of a replica is to handle read traffic. They are read-only copies of the primary database.

In Amazon RDS, you can create up to how many read replicas of a source DB instance?

  • A) 10
  • B) 5
  • C) 15
  • D) Unlimited
  • Answer: B

Explanation: Amazon RDS allows you to create up to 5 read replicas of a source DB instance.

What is the name of the feature that enables the creation of one or more read replicas for a given source DB instance and can be created within the same AWS Region or in a different AWS Region?

  • A) Multi-AZ deployments
  • B) Read replication
  • C) Database cloning
  • D) Multi-Read deployments
  • Answer: B

Explanation: Read Replication is the feature that allows for the creation of one or more read replicas of a source DB instance, within the same or different AWS Region.

True or False: Read replicas can have different DB parameter group from the master.

  • Answer: True

Explanation: That’s correct; read replicas can indeed have a different DB parameter group from the master DB.

Read replicas are mainly used for (select all that apply):

  • A) Distributing read traffic and offloading it from the master database
  • B) Databases backup
  • C) High-frequency write operations
  • D) Cross-region low latency reads
  • Answer: A, D

Explanation: Read replica databases are used to distribute read traffic away from the main database, and for cross-region low latency reads. They are not used for backups or high-frequency write operations.

What AWS service lets you easily set up, operate, and scale a relational database in the cloud?

  • A) Amazon RDS
  • B) Amazon S3
  • C) AWS Lambda
  • D) Amazon Redshift
  • Answer: A

Explanation: Amazon RDS specifically focuses on providing an easy solution for setting up, operating, and scaling a relational database in the cloud.

True or False: If the master database fails, AWS automatically promotes a read replica to become the new master.

  • Answer: False

Explanation: By default, AWS does not automatically promote a read replica. This operation must be done manually, or must be scripted using AWS SDK or CLI.

Which of the following AWS databases does not support read replicas:

  • A) MySQL
  • B) PostgreSQL
  • C) Oracle
  • D) DynamoDB
  • Answer: C

Explanation: Oracle RDS databases do not support read replicas within AWS.

Interview Questions

What is database replication in AWS?

Database replication in AWS is a mechanism to maintain copies of database instances across multiple AWS regions or availability zones. It helps in data distribution, offloading heavy traffic from master databases, disaster recovery and achieving low latency.

What are the types of database replication that AWS supports?

AWS supports two types of database replication: Multi-AZ and Read Replicas.

Can you describe what Read Replicas are in AWS?

Read Replicas in AWS allow you to create one or more read-only copies of your database instance within the same AWS region or another region. They are quite useful in scaling out beyond the capacity of a single database deployment, or to offload read traffic from your main database instance.

When would you use Read Replicas?

Read Replicas are typically used when the workload is read-intense, to increase aggregate read throughput, to serve read traffic when the primary instance is unavailable, and to lower latency for users in different geographical locations.

What is the maximum number of read replicas that you can create in AWS RDS?

You can create up to five read replicas for each primary DB instance, by default.

How are changes replicated to the Read Replica in AWS RDS?

Changes are replicated to the Read Replica using MySQL’s native database engine’s replication technology or using PostgreSQL’s open-source replication engine.

Is it possible to have a Read Replica of Read Replica in AWS RDS?

Yes, you can create a second-tier Read Replica from an existing Read Replica. However, any additional latency incurred by the primary replica is also added to the second-tier Read Replica.

Can a Read Replica be promoted to a standalone Database in AWS RDS?

Yes, a Read Replica can be promoted to a standalone database in AWS RDS. This operation ceases replication and allows the Read Replica to independently perform reads and writes.

What AWS RDS DB engines support Read Replicas?

AWS RDS supports Read Replicas for MySQL, MariaDB, PostgreSQL, Oracle, and the SQL Server DB engines.

What is Multi-AZ replication in AWS RDS?

Multi-AZ replication is a high availability option that creates and maintains a standby copy of your DB instance in a different Availability Zone. AWS automatically replicates the data to the standby instance with synchronous replication.

Can a Multi-AZ database instance serve read traffic?

No, the standby replica in a Multi-AZ deployment is maintained for failover support and not for serving read traffic. To serve read traffic, one should use read replicas.

What happens in a Multi-AZ deployment when a planned or unplanned outage occurs?

In the event of an outage, AWS RDS performs an automatic failover to the standby copy. The time it takes for the failover to complete depends on the database activity and other conditions at the time the primary DB instance became unavailable.

How is the data replication handled in a Multi-AZ deployment?

The data replication in a Multi-AZ deployment is synchronous.

How does AWS RDS ensure that the data on the primary and the standby replica in a Multi-AZ deployment remains synchronous?

AWS RDS uses synchronous replication to automatically update the data on the standby replica as it changes on the primary database.

Leave a Reply

Your email address will not be published. Required fields are marked *