Domain 2: Storage COPY Flashcards

1
Q

What is the write capacity for 1 WCU?

A

1 write per second up to 1KB each

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

Calculate these WCU:
• Example 1: we write 10 objects per second of 2 KB each.
• Example 2: we write 6 objects per second of 4.5 KB each
• Example 3: we write 120 objects per minute of 2 KB each

A
  • Example 1: we write 10 objects per second of 2 KB each.
  • We need 2 * 10 = 20 WCU
  • Example 2: we write 6 objects per second of 4.5 KB each
  • We need 6 * 5 = 30 WCU (4.5 gets rounded to the upper KB)
  • Example 3: we write 120 objects per minute of 2 KB each
  • We need 120 / 60 * 2 = 4 WCU
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the read capacity for 1 strongly consistent RCU?

A

2 reads per second up to 4KB each

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

What is the read capacity for 1 eventually consistent RCU?

A

1 read per second up to 4KB each

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

Calculate these RCUs:

  • Example 1: 10 strongly consistent reads per second of 4 KB each
  • Example 2: 16 eventually consistent reads per second of 12 KB each
  • Example 3: 10 strongly consistent reads per second of 6 KB each
A
  • Example 1: 10 strongly consistent reads per second of 4 KB each
  • We need 10 * 4 KB / 4 KB = 10 RCU
  • Example 2: 16 eventually consistent reads per second of 12 KB each
  • We need (16 / 2) * ( 12 / 4 ) = 24 RCU
  • Example 3: 10 strongly consistent reads per second of 6 KB each
  • We need 10 * 8 KB / 4 = 20 RCU (we have to round up 6 KB to 8 KB)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the maximum data size for a DynamoDB partition?

A

10GB

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

What is the maximum RCUs for a DynamoDB partition?

A

3000

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

What is the maximum WCUs for a DynamoDB partition?

A

1000

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

What is the maximum record size in DynamoDB?

A

400KB

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

What is the minimum record size in DynamoDB?

A

1 byte

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

How DynamoDB Scan works?

A
  • Scan the entire table and then filter out data (inefficient)
  • Returns up to 1 MB of data – use pagination to keep on reading
  • Consumes a lot of RCU
  • Limit impact using Limit or reduce the size of the result and pause
  • For faster performance, use parallel scans:
  • Multiple instances scan multiple partitions at the same time
  • Increases the throughput and RCU consumed
  • Limit the impact of parallel scans just like you would for Scans
  • Can use a ProjectionExpression + FilterExpression (no change to RCU)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a Local Secondary Index (LSI) in DynamoDB?

A

It is an alternate range key for your table, local to the hash key.

It can only be defined at table creation time

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

What is a Global Secondary Index (GSI) in DynamoDB?

A
  • It is a way to speed up queries on non-key attributes
  • GSI = partition key + optional sort key
  • The index is a new “table” and we can project attributes on it
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the default DynamoDB TTL configuration duration?

A

48h

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

How can you store large objects using DynamoDB?

A

As DynamoDB max item size is 400kb, you can store the large object in S3 and store only its metadata in DynamoDB, pointing to the correct location.

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