Database - RDS, Dynamo, PostgreSQL, Aurora, MySQL, MariaDB, Elasticache Flashcards

RDS, Dynamo, PostgreSQL, Aurora, MySQL, MariaDB, Elasticache

1
Q

What is a relational database?

A

a traditional database that is made up like a spreadsheet with tables, rows, and fields.

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

Name the database Types in AWS

A

SQL server Oracle MySQL Server PostgreSQL Aurora MariaDB

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

Describe how a non-relational database works

A

collection = table document = row key value pairs - fields

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

What is data warehousing?

A

It is used to pull in very large and complex data sets. Usutally used by management to do queries on data (such as current performance vs targets, etc.) It is used for business intelligence. Tools like Cognos, Jaspersoft, SQL Server Reporting Services, Oracle Hyperion, and SAP Netweaver.

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

What is OTLP?

A

Online Transaction Processing

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

What is OLAP?

A

Online Analytics Processing

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

How do OLAP and OTLP differ?

A

They differ in terms of queries you will run. OTLP example: 2120121 -pulls up a row of data such as NAME, Date, Address to deliver to, delivery status, etc. OLAP example: Pulls in large number of records. Net profit for EMEA and Pacific for the digital record product. Sum of radios sold in EMEA Sum of radios sold in pacific Unit cost of Radio in each region Sales price of each radio Sales price - unit cost

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

T or F data warehousing databases use the same type of architecture from a db perspective and infrastructure layer.

A

False data warehousing uses different type of architecture both from a DB perspective and infrastructure layer.

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

A web server that makes it easy to deploy, operate, and scale in memory cache in the cloud is called what?

A

Elasticache

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

T or F Elasticache improves the performance of web apps by allowing you to retrieve info from fast, managed, in-memory caches, instead of relying entirely on slower disk based databases.

A

True

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

Name the types of Elasticache:

A

Memcached and Redis

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

Name the two types of RDS backups for AWS:

A

Automated backups and DB snapshots

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

_____ allows you to recover your DB to any point in time within a retention period.

  1. Automated backups
  2. DB Snapshots
A

automated backups

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

These types of backups are done manually (user initiated)

  1. Automated backups
  2. snapshots
A

Snapshots

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

The retention period for autometed backups can be between _____ and ___ days.

  1. 1 and 5
  2. 1 and 35
  3. 1 and 100
  4. infinite
A

2) 1 and 35

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

Automated backups will take a full daily snapshot and will also store

____ logs during the day

A

transaction

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

T or F

When you do a recovery, AWS will first choose the most recent daily backup and then apply transaction logs relevant to that dayl. This allows you to do a point in time recovery down to a second, within the retention period.

A

True

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

T or F

Automated backups are disabled by default.

A

False

Automated backups are enabled by default

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

Where are automated backups stored?

A

S3

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

T or F

With automated backups, you get unlimited, free storage space in S3.

A

False.

You get free storage space = to the size of your DB.

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

T or F

Backups are taken every time a change is made to the DB.

A

false.

Backups are taken within a defined window.

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

T or F

During the backup window, storage IO may be suspended while your data is being backed up and you may experience elevated latency.

A

True

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

T or F

Snapshots are stored even after you delete the original RDS instance, unlike automated backups

A

True

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

T or F

Whenever you restore either an Automated backup or a manual snapshot, the restored version of the DB will be a new RDS instance with a new DNS endpoint.

A

True

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

_____ allows you to have an exact copy of your DB in another AZ

A

multi-az

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

T or F

AWS handles multi-AZ DB replciation for you, so when your prod DB is written to, this write will automatically be syncronized to the standby database.

A

True

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

T or F

IN the evnet of planned DB maintenance, DB intance failure, or an AZ failure, RDS will auto failover to the standby so that DB ops can resume quickly without administrative intervention.

A

True

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

T or F

Multi-AZ is for disaster recovery only

A

True

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

T or F

Multi-AZ is also designed to improve performance

A

False

It is not primarily used for improving performance. For performance improvement , you need read replicas.

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

Which DBes are types of multi-az databases:

  1. SQL server
  2. aurora
  3. oracle
  4. mysql
  5. postgreSQL
  6. mariaDB
A

All of the above

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

_________ allow you to have a read only copy of your production DB.

A

read replicas

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

Read replicas achieve syncronization from the primary DB by using ______ replication.

A

asyncronous

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

Why would you use read replicas for your DB?

A

You want to use read replicas when you have very read heavy db workloads.

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

Read replicas are availabe for the following DBes:

  1. SQL
  2. mysql
  3. postgreSQL
  4. mariDB
  5. aurora
A

mysql

postgreSQL

mariaDB

aurora

They are not available for SQL

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

T or F

read replicas are used for disaster recovery, not scaling.

A

false

read replicas are used for scaling, not DR

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

T or F

You must have automated backups turned on in order to deploy a read replica

A

True

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

You can have up to ____ read replica copies of any DB

A

5

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

T or F

You can have read replicas of read replicas

A

True, but you must watch latency

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

T or F

read replicas share DNS endpoints

A

False

each read replica will have its own DNS endpoint

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

T or F

You can have read replicas that have multi-AZ

A

True

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

T or F

you can create read replicas of multi-AZ source databses

A

True

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

T or F

read replicas can be promoted to be their own databses

A

true, but it breaks replication

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

T or F

you can’t have read replicas in another region

A

False

read relicas can be located in another region.

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

______ can be used to significantly improve latency and throughput for many read-heavy application workloads (such as social networking, gaming, media sharing, and Q&A portals or compute intensive workloads such as recommendation engines)

  1. magnetic storage
  2. elasticache
  3. load balancing
  4. container
A

Elasticache

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

_______ improves app performance by storing critical pieces of data in memory for low-latency access.

A

caching

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

T or F

cached info may include the results of IO intensive DB queries or the result of computationally intensive calculations.

A

True

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

A widely adopted memory object caching system. Elasticache is protocol compliant with _____, so popular tools that you use today with existing _____ environments will work seamlessly with the service.

A

memcached

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

A popular open source in-memory key-value store that supports data structures such as sorted sets and lists. Elasticache supports master/slace replication and multi-az, which can be used to achieve cross AZ redundancy.

A

Redis

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

Because of the replication and persistence features of ______, elasticache manages ______ more as a relational DB.

A

Redis

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

______ Elasticache clusters are managed as stateful entities tht include failover, similar to how Amazon RDS manages database failover.

A

Redis

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

Because _______ is designed as a pure coding solution with no persistence, Elasticache manages ______ nodes as a pool that can grow and shrink, similar to an EC2 ASG. Individual nodes are expendable and Elasticache provides additional capabilities here, such as auto node replacement and auto discovery.

A

memcached

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

Is object caching your primary goal, for example to offload your DB, if so, use this….

  1. memcached
  2. redis
A

memcached

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

are you interested in as simple caching model as possible? if so use this….

  1. memcached
  2. redis
A

memcached

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

Are you planning on running large cache nodes and require multi-threaded performance with utilization of multiple codes? if so use this….

  1. memcached
  2. redis
A

memcached

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

Do you want the ability to scale your cache horizontally as you grow, if so use this….

  1. memcached
  2. redis
A

memcached

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

are you looking for more advanced data types, such as lists, hashes, and sets? if so use this….

  1. memcached
  2. redis
A

redis

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

does sorting and ranking data sets in memory help you, such as with leaderboards? if so, use this…

  1. memcached
  2. redis
A

redis

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

is persistence of your key store important? if so, use this…

  1. memcached
  2. redis
A

redis

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

do you want to run with multiple AWS AZ with failover?

if so, use this…

  1. memcached
  2. redis
A

redis

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

______ is a fast and flexible NoSQL DB service for all apps that need consisten, single digit millisecond latency at any scale.

A

DynamoDB

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

_______ is a fully managed DB and supports both documents and key-value data models. Its flexible data model and reliable performance make it a great fir for mobile, web, gaming, ad-tech, IoT, many other apps.

A

DynamoDB

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

T or F

DynamoDB is stored on magnetic storage

A

False

DynamoDB is stored on SSD storage

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

DynamoDB is spread across ___ goegraphically distinc data centers

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

Which of these is the default for DynamoDB

Eventual Consistent reads

Strongly consisten reads

A

Eventual consistent reads

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

DynamoDB

Consistently across all copies of data is usually reached within a second. Repeating a red after a short time should return the updated data. Best read performance)

  1. Eventually consistent read
  2. Strongly consistent read
A

Eventually consistent read

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

DynamoDB

This returns a result that reflects all writes that received a successful response prior to the read.

  1. Eventually consistent read
  2. Strongly consistent read
A

Strongly consistent read

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

T or F

DynamoDB tables are made up of Items and Attributes

Items (think of a row of data in a table)

Attributes (Think of a column of data in a table)

A

True

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

T or F

DynamoDB supports key-value and document data structures

A

True

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

DynamoDB

The name of the data = ____

The data itself =_____

A

key

value

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

DocDB documents can be written in:

  1. JSON
  2. HTML
  3. HTTP
  4. XML
  5. JAVA
A

JSON

HTML

XML

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

DynamoDB stores and retrieves data based on a ______ key

A

primary

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

2 types of primary keys:

______ key and ____ key

A

partition and composite key

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

This Dynamo DB key is a unique attribute (userID) value of the part key is input to an internal hash function which determines the partition or physical location on which the data is stored.

A

partition key

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

T or F

If you are using the partition key as your primary key, then no two items can have the same partition key.

A

true

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

DynamoDB

The composite key is made up of the ____ key and the ____ key

A

partition and sort key

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

DynamoDB

Primary key can be a composite key consisting of _____ key and ___ key.

A

primary and sort

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

___key = user ID

____ key = timestamp of the past

A

partition and sort

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

T or F

DynamoDB

2 different items may have the same partition key, but they must have a different sort key.

A

True

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

T or F

DynamoDB Composite Key

All items with teh same partitionkey are stored together, then sorted according to the sort key value.

A

True

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

T or F

DynamoDB Composite key

Allows you to store multiple items with same partition key

A

True

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

T or F

DynamoDB Authentication and Access control is managed using AWS cognito

A

False

DynamoDB Authentication and Access control is managed using AWS IAM

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

T or F

YOu can create an IAM user within your AWS Account which has specific permissions to access and create DynamoDB tables.

A

True

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

T or F

You can create an IAM role which enables you to obtain temp access keys which can be used to access DynamoDB.

A

true

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

T or F

You can also use a special IAM condition to restrict user access to only their own records.

A

True

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

In SQL, and _____ is a data structure which allows you to perform fast queries on specific columns in a table. You select the columns that you want included in the ____ and run your searches on the _____ rather then on the entire dataset.

A

index

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

IN DynamoDB, there are 2 types of indexes that are supported to help speed up your DynamoDB queries:

_______Secondary index

______Secondary index

A

Local and Global

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

DynamoDB

This can only be created when you are creating your table

  1. Local secondary index
  2. Global secondary index
A

Local secondary index

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

DynamoDB

You can’t add, remove, or modify it later.

  1. local secondary index
  2. global secondary index
A

local secondary index

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

DynamoDB

It has the same partition key as your original table

  1. local secondary index
  2. global secondary index
A

local secondary index

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

DynamoDB

It uses a different sort key

local secondary index

global secondary index

A

local secondary index

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

DynamoDB

it gives you a differnt view of your data, organized according to an alternative sort key

local secondary index

global secondary index

A

local secondary index

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

DynamoDB

any queries based on this sort key are much faster using the index than the main table

local secondary index

global secondary index

A

local secondary index

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

DynamoDB

YOu can create when you create your table, or add it later

local secondary index

global secondary index

A

global seconday index

94
Q

DynamoDB

different partition key as well as a different sort key

local secondary index

global secondary index

A

global secondary index

95
Q

DynamoDB

gives a completely different view of the data (speeds up any queries relating to this alternative pertition and sort key)

local secondary index

global secondary index

A

global secondary index

96
Q

A ____ operation finds items in the table based on floor on the primary key attribute and distinct value to search for.

IE: select an item where the user id = 212, will selecct all the atributes for that item, -first name, surname, email, etc.

A

query

97
Q

T oR F

Dynamo DB

You can use an optional sort key name and value to refine the results of your query.

ie: if your sort key is a timestamp, you cna refine the query to only select items with a time stamp of the last 7 days.

A

True

98
Q

DB queries

By default, a query returns all the attributes for the items but you can use the projection expression parameter if you want the query to only return the specific attributes you want. Ie: if you want to see the email address ranter than all the attributes.

A

True

99
Q

T or F

Query results are always sorted by the partition key

A

False

Query results are always sorted by the sort key

100
Q

T or F

DB queries

Numeric order - by default is in ascending order (1,2,3,4)

A

true

101
Q

T or F Db queries

ASCII characters code value

A

true

102
Q

T or F

Db queries

YOu can reverse the order by setting the ScanIndexForward

parameter to True

A

False

YOu can reverse the order by setting the ScanIndexForward

parameter to False

103
Q

T or F DB queries

by default, queries are eventually consistent

A

true

104
Q

T or F

DB queries

you need to explicitly set the query to be strongly consistent

A

True

105
Q

DB

a ____ operation examines every item in the table

A

scan

106
Q

scans return all data atributes by default?

T or F

A

True

107
Q

Use the ProjectionExpression parameter to refine the scan to only return the attributes you want.

T or F

A

True

108
Q

T or F

Scan is more efficient than a query

A

False.

Query is more efficient than a scan

109
Q

Scan dumps the entire table, then filters out the values to provide the desired result - removing the unwanted data.

T or F

A

True

110
Q

Scna dumps add an extra step of removing the data you don’t want.

T or F

A

True

111
Q

as a table grows, scan operations take longer

T or F

A

True

112
Q

Scan operations on a large table cna use up the provisioned throughput for a large table in just a single operation.

T or F

A

True

113
Q

DB queries and scans

You can improve the impact of the query or scan by setting a smaller page size which uses fweer read ops. IE: set page size to return 40 items.

T or F

A

True

114
Q

DB queries and scans

Larger number of smaller ops will allow other requests to succeed without throttling.

T or F

A

True

115
Q

Db queries and scans

Avoid using scan ops if you can: design tables in a way that you can use the query, get, or BatchGetItem APIs.

T or F

A

True

116
Q

improving scan performance

by default, s scan operation processes data sequentially in returning 1MB increments before moving on to retrieve the next 1MB of data. It can only scan one parition at a time.

T or F

A

True

117
Q

IMproving scan performance

YOu can configure DynamoDB to use parallel scans instead by logically dividing a table or index into segments and scanning each segment in parallel.

T or F

A

true

118
Q

improve scan performance

Best to avoid using parallel scans if your table or index is already incurring heave read/write activity from other apps.

T or F

A

true

119
Q

A scan operation finds items in a table using onlyt eh primary key attrribute

T or F

A

False

A query operation finds items in a table using onlyt eh primary key attrribute

120
Q

Queries and scans

You privide the secondary key name and a distinct value to search for.

T or F

A

False

You privide the primary key name and a distinct value to search for.

121
Q

A scan operation examines every item in teh table.

T or F

A

True

122
Q

a scan operation returns all data attributes by default

T or F

A

True

123
Q

You cna use the projection expression parameter to refine the results of a scan or query.

T or F

A

True

124
Q

Query results are always sorted by teh sort key if there is one.

T or F

A

True

125
Q

Query operation is generally more efficient than a scan

T or F

A

True

126
Q

The following can improve scan performance:

T or F

Reducs the impact of a query or scan by setting a smaller page size, which uses fewer read operations.

  • Isolate scan operations to specific table sand segregate them from your missions critical traffic
  • try parallel scans, rather than the default sequential scan
  • avoid using scan operations, if you can, design tables in a way that you cna use the query , Get or BatchGetItem API.
A

True

127
Q

DynamoDB provision throughput is measured in _____ units

A

capacity

128
Q

when you create your table, you specify your requirements in terms of _____ capacity unit and ____ capacity units.

A

read and write

129
Q

1x ____ capacity unut = 1x 1KB _____/second

A

write

130
Q

1x _____ capcacity unit = 1x strongly consistent ____ of 4kb/second

or

2x _______consisten reads of 4kb/second (default)

A

read, read, eventually

131
Q

This is an example configuration of what?

Table with 5x read capacity units and 5x write capacity units

This consig will be able to perform 5x 4kb strongly consistent reads = 20kb/second

twice as many eventually consistent =40kb

5x1kb writes = 5kb/second

A

provisioned throughput

132
Q

T or F

I your app reads or writes longer items, it iwll consume more capacity units and will cost you more as well.

A

True

133
Q

T or F

Strongly consistent reads calculation

Your app needs to read 80 items (table rows)/ second

each item is 3kb in size

you need strongly consistent reads

first, calculate how many read capacity units needed for each read:

size of each items /4kb

3kb/4kb=.75

Rounded up to the nearest whole number, each read will need 1x

read capacity unit per operation.

multiplied by the number of reads per second = 80 read capacity units required.

A

true

134
Q

If you need ______ consistent reads,

you do the same calculation as stronly consistent. However as this is for ______ consistent reads, you get 2x 4kb reads/second or double the throughput of strongly consistent reads.

size of each item/4kb

3kb/4kb=.75

round up to the nearest whole number, =1

multiply by the number of reads per second = 80

dicide 80 by 2, so you only need 40 read capacity units for ____ consistent reads

A

eventually

135
Q

_____ capacity units calculation.

you want to write 100 items/second

each item is 512 bytes in size

First calculate how many capacity units for each _____:

size of each item /1kb (for _____ capacity units)

512 bytes/1kb = .05

rounded up to the nearest whole number, each ____ will need 1x ____ capacity unit per ____ operation.

multiplied by the number of _____ per second = 100 ______ capacity units required

A

write

136
Q

_____ _____ is measured in capacity units

A

provisioned throughput

137
Q

1x ____ capacity unit = 1x 1kb _____/second

A

write

138
Q

1 x ___ capacity unit = 1 x 4kb _____consistent ____ or

2 x 4kb _____ consistent _____/second

A

read, strongly, read, eventually, read

139
Q

T or F

In DynamoDB on demand, charged apply for reading, writing, and storing data.

A

True

140
Q

T or F

in DynamoDB, with on demand, you don’t need to specify your requirement.

A

True

141
Q

T or F

DynamoDB on demand is great for unpredicatable workloads

A

True

142
Q

WIth DynamoDB on-demand, you want to pay only for waht you use (pay per request)

T or F

A

True

143
Q

DynamoDB

unknown workloads

  1. on-demand capacity
  2. provisioned capacity
A

on-demand capacity

144
Q

DynamoDB

you can forecast read and write capacity units

  1. on-demand capacity
  2. provisioned capacity
A

provisioned capacity

145
Q

DynamoDB

unpredictable app traffic

  1. on-demand capacity
  2. provisioned capacity
A

on-demand capacity

146
Q

DynamoDB

predictable app traffic

  1. on-demand capacity
  2. provisioned capacity
A

provisioned capacity

147
Q

DynamoDB

app trffic is consistent or increases gradually

  1. on-demand capacity
  2. provisioned capacity
A

provisioned capacity

148
Q

DynamoDB

you want to pay per use model

  1. on-demand capacity
  2. provisioned capacity
A

on-demand capacity

149
Q

DynamoDB

spiky, short lived peaks

  1. on-demand capacity
  2. provisioned capacity
A

on-demand capacity

150
Q

This is a fully managed, clustered in-memory cache for DynamoDB

A

DynamoDB Accelerator (DAX)

151
Q

DAX delievers up to a ____x read performance improvement

  1. 5
  2. 10
  3. 20
  4. 30
A

10

152
Q

DAX delivers microsecond performance for millions of requests per second.

T or F

A

True

153
Q

DAX is ideal for read heavy and bursty workloads

Ie: auction apps, gaming, and retail sites during black Friday promotions.

T or F

A

True

154
Q

DAX is a _____ through caching service. This means data is written to the cache as well as the back end store at the same time.

A

write

155
Q

DAX allows you to point your DynamoDB API calls at the DAX cluster

A

True

156
Q

IF the item you are querying is in the cache (cache hit), DAX returns the result to the application

T or F

A

True

157
Q

If the item is not available (cache miss), then DAX performs an _______ consistent get item operation against DynamoDB

A

eventually

158
Q

retrieval of data from DAX reduces the read load on DynamoDB

T or F

A

true

159
Q

DAX may be able to reduce ______ read capacity

A

provisioned

160
Q

DAX caters for _____ consistent reads only - so not suitable for apps that require strongly consistent reads.

A

Eventually

161
Q

DAX is not suitable for ____ intensive apps

A

write

162
Q

DAX is suitable for apps that do not perform many read ops

T or F

A

False

DAX is suitable for apps that do not perform many write ops

163
Q

DAX is not suitable for apps that do not require microsecond response times

T or F

A

True

164
Q

T or F

DAX provides in-memory caching for DynamoDB table

A

True

165
Q

DAX is not suitable for write intensive apps or apps that require ______ consistent reads.

A

strongly

166
Q

Elasticache is in memory cache in the cloud

T or F

A

True

167
Q

Elasticache inproves performance of web apps, allowing you to retrieve info from fast in-memory caches ratherthan slower disk based databases

T or F

A

True

168
Q

Elasticache sites between your app and the database.

ie: an app frequently requesting specific product info for your best selling products.

T or F

A

True

169
Q

Elasticache takes the load off your databases

T or F

A

True

170
Q

Elasticache is good if your database is ____ heavy and the data is not changing frequently

A

read

171
Q

Elasticache improves performance for read heavy workloads

T or F

A

True

172
Q

with elasticache, frequently accessed data is stored in memory for low-latency access, improving the overall performance of your app.

A

True

173
Q

Elasticache is good for computer heavy workloads

T or F

A

true

174
Q

elasticache can be used to store results of IO intensive DB queries or output of the compute intensive calculations.

T or F

A

True

175
Q

Name the two types of Elasticache…

A

redis and memcached

176
Q

Widely adopted memory object caching system

  1. memcached
  2. redis
A

memcached

177
Q

open source in-memory key-value store

  1. memcached
  2. redis
A

redis

178
Q

multithreaded

  1. memcached
  2. redis
A

memcached

179
Q

no AZ capability

  1. memcached
  2. redis
A

memcached

180
Q

supports complex data structures: sorted sets and lists

  1. memcached
  2. redis
A

redis

181
Q

supports master/slave replciation and multi-AZ for cross AZ redundancy

  1. memcached
  2. redis
A

redis

182
Q

what are the 2 strategies used in caching?

A

lazy loading and write-through

183
Q

Loads the data into cache only when necessary

  1. Lazy Loading
  2. Write-Through
A

Lazy loading

184
Q

if requested data is in the cache, EC returns the data to the app.

  1. lazy loading
  2. write-through
A

lazy loading

185
Q

if the data is not in the cache, or has expired, EC returns a null.

  1. lazy loading
  2. write-through
A

lazy loading

186
Q

Your app then fetches the data from DBs and writes tha data received into the cache so that its available next time

  1. lazy loading
  2. write-through
A

lazy loading

187
Q

Lazy loading - advantage or disadvantage?

Only requested data is cached: avoids filling up cache with useless data

A

advantage

188
Q

Lazy loading - advantage or disadvantage?

node failures are not fatal. a new empty node will just have a lot of cache misses initially.

A

advantage

189
Q

Lazy loading - advantage or disadvantage?

cache miss penalty: initial request query to DB writing of data to the cache.

A

disadvantage

190
Q

Lazy loading - advantage or disadvantage?

stale data - if data is only updated when there is a cache miss, it can become stale. doesn’t automatically update if teh data in teh DB changes.

A

disadvantage

191
Q

TTL = ____

A

Time to live

192
Q

TTL specifies the number of seconds until the ____ (data) expires to avoid keeping stale data in teh cache

A

key

193
Q

_____ _____ treats an expired key as a cache miss and causes the app to retreive the data from the DB and sequentially write the data into the cache with the new TTL.

A

Lazy loading

194
Q

____ does not eliminate stale data - but it helps avoid it.

A

TTL

195
Q

_____-_____ adds or updates data to the cache whenever data is written to the databases.

A

write-through

196
Q

write-through advantage or disadvantage?

write penalty: every write involves a write to the cache as well as write to the DBes.

A

disadvantage

197
Q

write-through advantage or disadvantage?

data in cache is never stale

A

advantage

198
Q

write-through advantage or disadvantage?

users are generally more tolerant of additionally latency when updating data than when retrieving it.

A

advantage

199
Q

write-through advantage or disadvantage?

wasted resources if most of the data is never read

A

disadvantage

200
Q

write-through advantage or disadvantage?

If a node fails a new node is spun up, data is missing until added or updated in the database (migrate by implementing Lazy Loading inconjunction with write-through)

A

disadvantage

201
Q

What does ACID transactions stand for?

A

Atomic, Consistent, Isolated, Durable

202
Q

DynamoDB transactions

read or write multiple items across multiple tables as an all or nothing operation

T or F

A

True

203
Q

DynamoDB Transactions

Checks for a pre-requisite condition before writing to a table

T or F

A

True

204
Q

DynamoDB TTL

TTL ______ defines an expiry time for your data

A

attribute

205
Q

DynamoDB TTL

Expired items are marked for deletion

T or F

A

true

206
Q

DynamoDB TTL

Great for removing irrelevant or old data:

Session data

event logs

temporary data

T or F

A

True

207
Q

DynamoDB TTL

Reduces cost by automatically removing data when is no longer relevant

A

True

208
Q

Session data table

TTL expressed as _____ time

A

epoch

209
Q

session data table

expiration is set for ____ hours after the session began

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
A

2

210
Q

session data table

when the current time is greater than the TTL, the item will be expired and marked for deletion.

T or F

A

True

211
Q

session data table

you can’t filter out expired items for your queries and scans

A

false

you can filter out expired items for your queries and scans

212
Q

DynamoDB Streams

These are Time ordered sequence of item level modifications

(insert, update, delete)

T or F

A

True

213
Q

DynamoDB Streams

Logs are encrypted at rest and stored for 24 hours

T or F

A

True

214
Q

DynamoDB Streams

Accessed using a dedicated endpoint

T or F

A

True

215
Q

DynamoDB Streams

By default the Secondary Key is recorded before and after images can be captured

T or F

A

False

By default the Primary Key is recorded

216
Q

Processing DynamoDB Streams

Events are recorded in near real time

T or F

A

True

217
Q

Processing DynamoDB Streams

Apps can take actions based on contents

T or F

A

True

218
Q

Processing DynamoDB Streams

Event source for Lambda

T or F

A

True

219
Q

Processing DynamoDB Streams

Lambda polls the DynamoDB stream

T or F

A

True

220
Q

Processing DynamoDB Streams

Executes Lambda code based on a DynamoDB treams event

T or F

A

True

221
Q

DynamoDB streams is stored for 24 hours only

T or F

A

True

222
Q

Processing DynamoDB Streams

Can be used as an event source for Lambda so you can create apps which table actions based on your events in your DynamoDB table.

T or F

A

True

223
Q

ProvisionedThroughputExceededException

You request rate is too hight for the readwrite capacity provisioned on your DynamoDB table

T or F

A

True

224
Q

ProvisionedThroughputExceededException

-SDK will automatically retry the request until successful

T or F

A

True

225
Q

ProvisionedThroughputExceededException

If you are not using teh SDK, you can:

  • Reduce request frequency
  • Use ‘Exponential Backoff’

T or F

A

True

226
Q

What is exponential Backoff?

-many components in a network can generate errors due to being overloaded

T or F

A

True

227
Q

What is exponential Backoff?

In addition to simple retries, all AWS SDKs use ‘Exponential Backoff’

T or F

A

True

228
Q

What is exponential Backoff?

Progressively longer waits between consecutive retries

ie: 50ms, 100ms, 200ms… for improved flow control

T or F

A

True

229
Q

What is exponential Backoff?

If after 1 min this doesn’t work, your request size may be exceeding the throughput for your read/write capacity

A

True

230
Q

T or F

If you use a ProvisionedThroughputExceeded Error, this means the number of requests is too low.

A

False

If you use a ProvisionedThroughputExceeded Error, this means the number of requests is too high.

231
Q

T or F

Exponential Backoff improves flow by retrying requests using progressively longer waits.

A

True

232
Q
A