NoSQL & DynamoDB Flashcards

1
Q

What is DynamoDB (DDB)?

A

A fully managed DBaaS providing wide-column key/value stores.

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

In what ways is DynamoDB resilient?

A

Across AZs and optionally global.

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

How are DynamoDB tables keyed?

A

Either with a simple key (the partition key) or a composite key (the partition key and a sort key).

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

What is the byte-size maximum for a DynamoDB item?

A

400KB. This includes the key(s).

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

How is DynamoDB capacity allocated?

A

Capacity refers to performance, not storage, and is broken up into Write Capacity Unites (WCUs) and Read Capacity Units (RCUs).

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

What is Point-in-time Recovery (PITR) and how does it work?

A

Optional per-table feature that, when enabled, continuously streams backups for a 35 day window. Restores can be applied from this window with 1-second granularity.

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

What is DynamoDB billing based on?

A

RCU, WCU, Storage needed, and any enabled features like PITR.

Reservation commitments are available for known, long-term needs.

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

How many RCUs/WCUs are consumed per operation?

A

4KB per RCU per second, and 1KB per WCU per second. Every operation consumes at least one R/WCU - small operations can be considered to “round up.”

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

When running Scan operations on a DynamoDB table, how are RCUs calculated?

A

The number of RCUs consumed is based on the byte size of the entire table, not just the returned items. Scanned but not returned items still consume capacity during a Scan.

For example, Scanning at table with 38KB of items will always consume 10 RCUs (⌈38KB / 4KB⌉) for strongly-consistent reads.

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

What are the consistency options in DynamoDB?

A

Eventually consistent and strictly consistent.

Strongly consistent reads always connect to the leader node, while eventually consistent reads choose a random node and cost half the capacity.

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

How do DynamoDB Local Secondary Indexes (LSI) work?

A

LSIs are alternative views of a table that allow the definition of alternative SK (sort key). They share RCU and WCU capacity with the base table.

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

How many LSIs can be created per DynamoDB Table?

A

Five.

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

Can you add LSIs to an already defined DynamoDB table?

A

No. They must be created at the same time as the base table.

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

Are DynamoDB indexes sparse or dense?

A

Sparse. Items which don’t include an attribute value for the index’s key(s) are omitted from the view.

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

How do DynamoDB Global Secondary Indexes (LSI) work?

A

GSIs are alternative views of a table that allow the definition of both and alternative PK and SK. They do not share RCU and WCU capacity with the base table.

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

How many GSIs can be created per DynamoDB Table?

A

Twenty.

17
Q

Can you add GSIs to an already defined DynamoDB table?

A

Yes. Unlike LSIs, they can be added after the base table has been created.

18
Q

What is the consistency model for DynamoDB GSIs?

A

Global Secondary Indexes are always eventually consistent, there is no other option.

19
Q

What is a DynamoDB Stream?

A

A time-ordered list of changes to items in a table.

20
Q

How much data is in a DynamoDB Stream?

A

It’s a 24-hour rolling window of changes, influenced by the view types.

KEYS_ONLY - just the PK/SK of the changed record
NEW_IMAGE - full item before the change
OLD_IMAGE - full item after the change
NEW_AND_OLD_IMAGES - both pre/post change states

21
Q

What is the use case for DynamoDB Triggers?

A

Developing a serverless, event-driven architecture based on a DynamoDB Stream + Lambda.

22
Q

What are DynamoDB Global Tables?

A

An architecture for cross-region, multi-master replication.

23
Q

How are write conflicts resolved with DynamoDB multi-master writes?

A

Last writer wins.

24
Q

Can you perform strongly-consistent reads from a DynamoDB Global Table?

A

Yes, but only from within the same region as the write, any cross-region reads are eventually consistent via sub-second replication.

25
Q

What is DynamoDB Accelerator (DAX)?

A

An in-memory cache that provides an SDK for tight integration at the application level.

Clustered, deployed into a VPC, and supports write-through.

26
Q

What is Amazon Athena?

A

A serverless interactive querying service, allowing ad-hoc queries against data stored in S3.

27
Q

What is ElastiCache?

A

Managed in-memory cache, either Redis or Memcached.

28
Q

What is Amazon Redshift?

A

An OLAP petabyte-scale data warehouse.

29
Q

Amazon Redshift typically runs in a single AZ in a VPC - are there ways to integrate with more complex networks?

A

Yes, by enabling Enhanced VPC Routing.

30
Q

What are some other AWS services can that directly integrate with Reshift?

A

Kinesis Firehose, DMS (the Database Migration Service), and S3.

31
Q

What are the disaster recovery options for Redshift?

A

Snapshots stored into S3 can be used for restores, which can also be cross-region.