Database Flashcards

1
Q

What are the DB Instance Types?

A

M (Multipurpose)
R (RAM / Memory)
T (Tiny / Burstable)

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

What are the Aurora features for automatic reliability?

A

Storage Auto Repair (detects failing discs)
“Survivable” cache warming (separate process to warm cache)
Crash Recovery (almost instant recovery

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

What are the three security levels for Aurora?

A

IAM
Security Groups
Database Authentification

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

What are the three storage types?

A

Magnetic, General Purpose & Prov. IOPS

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

When does RDS automatically fail over?

A

Loss of AZ
Loss of network connectivity to primary instance
Compute unit failure on primary instance
Storage failure on primary instance

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

How to enable Multi-AZ on RDS?

A

It can be created new or as a modification

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

What to consider for read replicas?

A
  • Automated backup must be enabled
  • Cannot be used behind an ELB
  • Can be promoted to primary, will break the replication
  • Up to 5 RRs (mysql/postgres)
  • Up to 15 RRs for Aurora
  • Multi Region for mysql, postgres & aurora
  • Database snapshots cannot be made from RRs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How is the failover process for RDS structured?

A

Automatically, needs 60-120s (more for large DBs)

It changes the DNS endpoint

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

What is RDS Snapshot Copy?

A

Possibility to copy snapshots to any public Region

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

How are automatic snapshots generated?

A

Daily in the backup window. I/O can be reduced in that time.

It cannot overlap with the weekly maintenance window.

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

How to scale up in a Multi-AZ environment?

A

First the Standby will be upgraded, then there’s a minimal downtime when the primary is scaled

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

What is Sharding?

A

Horizontal partitions

Seperate instances that contain a subset of the whole dataset

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

What can be be monitored in RDS?

A

CPU/RAM/Disk space consumptions
Network traffic
Database connections
IOPS metrics

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

Dynamo DB: What is an item?

A

Group of attributes that can be uniquely identified from all other items

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

Dynamo DB: How are RCU calculated?

A

One read capacity: 1 strongly consistent read or 2 eventually consistent read of 4KB

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

Dynamo DB: How are WCU calculated?

A

1KB in size = 1 WCU

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

Dynamo DB: What is Reserved Capacity?

A

Reserving RCU/WCU for a fee, which reduces the cost of the IOPS

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

DynamoDB: How do indicies affect WCU?

A

Every WCU scales with the amount of indices.
1 primary: 1KB
1 primary + index: 2KB

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

DynamoDB: What happens when the prov. throughput is exceeded?

A

It fails with a 400 code.

AWS SDK have an automatic retry.

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

What is the benefit of a VPC endpoint?

A
  • no need for internet of NAT
  • no need for additional firewalls
  • no additional costs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Redshift: What is the purpose of the leader node?

A

It receives the queries, parses them and develops execution plan

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

What is the maximum number of data copies that Amazon Aurora can lose without affecting writes?

A

Amazon Aurora at maximum can withstand the loss of two copies of data without affecting writes

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

What CloudWatch metric is used to determine needs for storage type changes?

A

ReadIOPS/WriteIOPS is a metric used to determine a need for storage type changes.

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

What are two of the available node types for Amazon ElastiCache of the current generation?

A

Memory Optimized & General Purpose

25
Q

What needs to be done when a RDS failover occurs.

A

Nothing, the connection endpoint will stay the same.

26
Q

What is Replication Lag?

A

The time it takes for the RR to include the most current data

27
Q

What is the requirement for enabling Read Replicas?

A

Enable automated backups

28
Q

Can you create an read replica of a read replica?

A

Yes, but here also automated backups need to be enabled for the original RR as well

29
Q

How to use an existing database for testing?

A

Promote a read replica as master - therefore you now have two databases in parallel

30
Q

How to encrypt an existing database?

A

Take a snapshot
Copy the snapshot in the same or different region with encryption enabled
Create a database

31
Q

How to share an encrypted RDS Snapshot with another account?

A
  • Create a custom (not the default) KMS Key and share it with the other account
  • Encrypt the database with that key
32
Q

Which ElastiCache engine supports Multi-AZ?

A

Redis

33
Q

RDS: How to scale?

A

Increase the size. (Scaling up)

It is not possible to scale out RDS

34
Q

RDS: What are the benefits of Multi-AZ?

A
  • High availability (failover)
  • Backups are taken from the standby
  • Restores are taken from the standby
35
Q

RDS: What happens when a Read Replica is created?

A

AWS takes a snapshot of the data (from the primary, o r the secondary if Multi AZ is enabled)

36
Q

RDS: What are the restriction to share an encrypted RDS Snapshot?

A
  • Cannot be encrypted with the default KMS Key
  • ## Cannot be shared public
37
Q

RDS: What is Aurora Serverless?

A

Automatically scaling database, where you are paid by the second of usage.
Very like Lambda.

38
Q

Which CLI command can you use to determine which version of RDS you are using?

A

describe-db-instances

39
Q

DynamoDB: How to use scheduled provisioning?

A

It is not possible to scale on a schedule, use auto-scaling instead

40
Q

You need to check the OS of the instances to ensure that the latest patches are installed and that the proper security requirements are being met. What AWS service could you use to complete your task?

A

Check maintenance of the instances on the Amazon RDS console.

41
Q

RDS: What are the two methods of backups?

A

point-in-time-recovery: database and transaction backup - allows to jump to a certain point in time.
Is stored for 35 days

DB Snapshots: Full database backup. Can be moved to another region and also used to create a new database

42
Q

RDS: How to avoid I/O suspension on backups

A

Use Multi-AZ

43
Q

Redshift: What happens, when a drive fails?

A

It is automatically replaced

44
Q

Redshift: What is an Audit Log?

A

Stores all SQL operations, such as login attempts, queries or changes to the database

45
Q

Which service can be used to migrate a database?

A

AWS Database Migration Service

46
Q

How does DynamoDB provide HA and high performance?

A

HA: It automatically replicates data to multiple AZs in a region.
Performance: It generates more partitions and provisions more server capacity if the table grows or mote throughput is needed

47
Q

What affects I/O?

A

Snapshot creation
Backups
Read Replica creation
Scaling storage

48
Q

RDS: Is it possible to create a Multi-.AZ setup after database creation?

A

yes

49
Q

RDS: What is RDS Snapshot Copy?

A

Possibility to copy snapshots to different regions.

Is a copy already exists only the storage delta is transferred

50
Q

What is a DynamoDB Stream?

A

Metadata about every create, update or delete on the table

51
Q

DynamoDB: What function is called for a single item or multiple items?

A

single: GetItem
multiple: BatchGetItem

52
Q

What would you call databases in a NoSQL implementation?

A

In a NoSQL implementation, databases are referred to as stores, and there are four
types of stores: document, graph, key/value, and wide column.

53
Q

Which type of NoSQL store is optimized for querying really large datasets?

A

Wide column stores

54
Q

What is the (soft) limit for RDS database?

A

40

55
Q

When would it be okay to disable automated backups?

A

When you are loading a large amount of data.

56
Q

RDS: When must the decision to encrypt a database be made? on creation or any time?

A

on creation.

57
Q

RDS: . What would be the best solution to

enable messages related to changes with your RDS clusters?

A

Amazon RDS events

58
Q

Which on is asynchronous, which one is synchronous?

Read-Replica, Multi AZ

A

Read-Replica: asynchronous

Multi AZ: synchronous