Amazon DynamoDB | Cross-region replication Flashcards

1
Q

Does Reserved Capacity apply to DynamoDB usage in Consolidated Billing accounts?

Cross-region replication

Amazon DynamoDB | Database

A

Yes. If you have multiple accounts linked with Consolidated Billing, Reserved Capacity units purchased either at the Payer Account level or Linked Account level are shared with all accounts connected to the Payer Account. Reserved capacity will first be applied to the account which purchased it and then any unused capacity will be applied to other linked accounts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a DynamoDB cross-region replication?

Cross-region replication

Amazon DynamoDB | Database

A

DynamoDB cross-region replication allows you to maintain identical copies (called replicas) of a DynamoDB table (called master table) in one or more AWS regions. After you enable cross-region replication for a table, identical copies of the table are created in other AWS regions. Writes to the table will be automatically propagated to all replicas.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

When should I use cross-region replication?

Cross-region replication

Amazon DynamoDB | Database

A

You can use cross-region replication for the following scenarios.

Efficient disaster recovery: By replicating tables in multiple data centers, you can switch over to using DynamoDB tables from another region in case a data center failure occurs.

Faster reads: If you have customers in multiple regions, you can deliver data faster by reading a DynamoDB table from the closest AWS data center.

Easier traffic management: You can use replicas to distribute the read workload across tables and thereby consume less read capacity in the master table.

Easy regional migration: By creating a read replica in a new region and then promoting the replica to be a master, you migrate your application to that region more easily.

Live data migration: To move a DynamoDB table from one region to another, you can create a replica of the table from the source region in the destination region. When the tables are in sync, you can switch your application to write to the destination region.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What cross-region replication modes are supported?

Cross-region replication

Amazon DynamoDB | Database

A

Cross-region replication currently supports single master mode. A single master has one master table and one or more replica tables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How can I set up single master cross-region replication for a table?

Cross-region replication

Amazon DynamoDB | Database

A

You can create cross-region replicas using the DynamoDB Cross-region Replication library.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do I know when the bootstrapping is complete?

Cross-region replication

Amazon DynamoDB | Database

A

On the replication management application, the state of the replication changes from Bootstrapping to Active.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Can I have multiple replicas for a single master table?

Cross-region replication

Amazon DynamoDB | Database

A

Yes, there are no limits on the number of replicas tables from a single master table. A DynamoDB Streams reader is created for each replica table and copies data from the master table, keeping the replicas in sync.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How much does it cost to set up cross-region replication for a table?

Cross-region replication

Amazon DynamoDB | Database

A

DynamoDB cross-region replication is enabled using the DynamoDB Cross-region Replication Library. While there is no additional charge for the cross-region replication library, you pay the usual prices for the following resources used by the process. You will be billed for:

Provisioned throughput (Writes and Reads) and storage for the replica tables.

Data Transfer across regions.

Reading data from DynamoDB Streams to keep the tables in sync.

The EC2 instances provisioned to host the replication process. The cost of the instances will depend on the instance type you choose and the region hosting the instances.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

In which region does the Amazon EC2 instance hosting the cross-region replication run?

Cross-region replication

Amazon DynamoDB | Database

A

The cross-region replication application is hosted in an Amazon EC2 instance in the same region where the cross-region replication application was originally launched. You will be charged the instance price in this region.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Does the Amazon EC2 instance Auto Scale as the size and throughput of the master and replica tables change?

Cross-region replication

Amazon DynamoDB | Database

A

Currently, we will not auto scale the EC2 instance. You will need to pick the instance size when configuring DynamoDB Cross-region Replication.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What happens if the Amazon EC2 instance managing the replication fails?

Cross-region replication

Amazon DynamoDB | Database

A

The Amazon EC2 instance runs behind an auto scaling group, which means the application will automatically fail over to another instance. The application underneath uses the Kinesis Client Library (KCL), which checkpoints the copy. In case of an instance failure, the application knows to find the checkpoint and resume from there.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Can I keep using my DynamoDB table while a Read Replica is being created?

Cross-region replication

Amazon DynamoDB | Database

A

Yes, creating a replica is an online operation. Your table will remain available for reads and writes while the read replica is being created. The bootstrapping uses the Scan operation to copy from the source table. We recommend that the table is provisioned with sufficient read capacity units to support the Scan operation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How long does it take to create a replica?

Cross-region replication

Amazon DynamoDB | Database

A

The time to initially copy the master table to the replica table depends on the size of the master table, the provisioned capacity of the master table and replica table. The time to propagate an item-level change on the master table to the replica table depends on the provisioned capacity on the master and replica tables, and the size of the Amazon EC2 instance running the replication application.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

If I change provisioned capacity on my master table, does the provisioned capacity on my replica table also update?

Cross-region replication

Amazon DynamoDB | Database

A

After the replication has been created, any changes to the provisioned capacity on the master table will not result in an update in throughput capacity on the replica table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Will my replica tables have the same indexes as the master table?

Cross-region replication

Amazon DynamoDB | Database

A

If you choose to create the replica table from the replication application, the secondary indexes on the master table will NOT be automatically created on the replica table. The replication application will not propagate changes made on secondary indices on the master table to replica tables. You will have to add/update/delete indexes on each of the replica tables through the AWS Management Console as you would with regular DynamoDB tables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Will my replica have the same provisioned throughput capacity as the master table?

Cross-region replication

Amazon DynamoDB | Database

A

When creating the replica table, we recommend that you provision at least the same write capacity as the master table to ensure that it has enough capacity to handle all incoming writes. You can set the provisioned read capacity of your replica table at whatever level is appropriate for your application.

17
Q

What is the consistency model for replicated tables?

Cross-region replication

Amazon DynamoDB | Database

A

Replicas are updated asynchronously. DynamoDB will acknowledge a write operation as successful once it has been accepted by the master table. The write will then be propagated to each replica. This means that there will be a slight delay before a write has been propagated to all replica tables.

18
Q

Are there CloudWatch metrics for cross-region replication?

Cross-region replication

Amazon DynamoDB | Database

A

CloudWatch metrics are available for every replication configuration. You can see the metric by selecting the replication group and navigating to the Monitoring tab. Metrics on throughput and number of record processed are available, and you can monitor for any discrepancies in the throughput of the master and replica tables.

19
Q

Can I have a replica in the same region as the master table?

Cross-region replication

Amazon DynamoDB | Database

A

Yes, as long as the replica table and the master table have different names, both tables can exist in the same region.

20
Q

Can I add or delete a replica after creating a replication group?

Cross-region replication

Amazon DynamoDB | Database

A

Yes, you can add or delete a replica from that replication group at any time.