Database Technologies Flashcards

1
Q

What situations do you use read replicas for? What form of consistency do you get with read replicas?

A

Read heavy workloads. Updates to the replicas are asynchronous and are therefore eventually consistent.

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

Do you need to make changes to your application to make use of read replicas?

A

Yes, connection strings in the application will need to be made

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

Are updates to replicas synchronous or asynchronous?

A

Asynchronous - reads and are eventually consistent

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

How many read replicas can an RDS instance have for MySQL and Aurora?

A

5 for MySQL and 15 for Aurora

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

How do you control actions that your systems and user can take on specific RDS instances?

A

IAM will control access to RDS resources. Security groups can be used to control network traffic to the RDS instance

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

What mechanism is used to control network access with RDS?

A

Security groups are leveraged for RDS netowrk security

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

Is RDS encrypted at rest by default? If not, when do you specify encryption?

A

Not by default. You specify encryption when you create the DB instance. OR you can create an encrypted snapshot of the DB by copying it and encrypting via KMS and then you this to restore the encrypted instance.

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

In a multi AZ RDS deployment, what happens if the primary fails?

A

The CNAME record is switched from the primary to the secondary as a part of automatic fail over.

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

If you are using IAM authentication to connect to a database rather than a database username and password, what must be done on the database to enable this?

A

SSL must be set when connecting to the DB. This allows us to use IAM roles to connect to the DB

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

Can you run any form of auditing on the underlying infrastructure of an RDS database?

A

No. RDS is a managed service

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

What options are available for RDS maintenance windows?

A

no preference or scheduled maintenance windows are available

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

What is an Aurora global database and what is the region configuration for this?

A

Aurora Global DB’s span multiple regions and enable robust DR with lower latency reads. They have 1 primary and 1 secondary region. Recommended over Cross Region Replication.

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

What 2 database engines is Aurora compatible with?

A

MySQL and PostgreSQL

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

How long are DynamoDB streams retained for?

A

24 Hours

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

If you need to create a DynamoDB global table what do you need to enable in Dynamo first to allow this?

A

Need to enable DynamoDB streams as these enable Dynamo to generate a change log to replicate data across regions

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

In Dynamo DB what two attributes make a composite key and what is the maximum size of EACH of the attributes

A

A composite key is made up of:
The Partition Key: 2KB
The SORT key: 1KB

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

In redshift, how do EVEN, ALL, KEY distributions distribute data across compute nodes?

A

Even: All data is spread evenly across nodes
All: Every table is sent to every node
Key: Data is spread based on a single column value

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

For objects cached in DAX, what is the TTL?

A

5 minutes (300 secs)

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

Does DynamoDB have a VPC endpoint?

A

yes

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

In DynamoDB you are received a provisioned throughput exception during peak load several months ago. You are anticipating a spike in load next week. On analysis you see that several keys are getting read repeatedly. What technology could you use to alleviate the problem?

A

DAX will cache reads from dynamo transparently with no need to update the application

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

Where can data be loaded into RedShift from?

A

S3, DMS, other DBs, almost anywhere.

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

What is the use case for RedShift Spectrum?

A

OLAP Queries on data held directly in S3.

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

In RedShift, what is the purpose of a leader node and a compute node? How many compute nodes can there be for a leader node and what are the maximum sizes?

A

Leader: manages client connections and queries
Compute: Executes queries, stores data and performs compute operations.
1 Leader: 128 Compute Nodes. Max size of 160GB

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

Can you authenticate to Aurora using IAM?

A

Yes. SSL must be enabled to support this.

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

What 3 actions can trigger an RDS failover?

A

Loss of AZ for primary, loss of network on primary, fail of storage on primary.

26
Q

What mechanism is used to control who can manage an RDS instance?

A

IAM Policies.

27
Q

Is replication for a Multi-AZ deployment synch or synch and what for of consistency do you get?

A

Synchronous and you get read after write consistency.

28
Q

With respect to DynamoDB where would you use exponential back-off?

A

If you start getting provisioned throughput exception errors

29
Q

What is a graph data structure and what type of AWS service is best suited for this?

A

Data with with highly complex relationships - such as social media posts. AWS Neptune supports graph data structures.

30
Q

Does DynamoDB support bursting throughput?

A

Yes, through the use of burst credits. If these credits are exceeded, you’ll get a provisioned throughput exception.

31
Q

When setting up a DynamoDB table, do we need to provision throughput?

A

Yes, you need to provision read and write capacity units.
1WCU = 1Kb/Sec.
1 RCU = 1 strong or 2 eventually consistent reads of 4Kb/Sec

32
Q

What are the 3 NoSQL Databases and what data structures do they support. (One is also a caching mechanism)

A

DynamoDB - JSON based data structure
Neptune - Graph based data structures
Elasticache - Key Value Pairs

33
Q

What’s the maximum SIZE of a compute node in Redship

A

160GB

34
Q

What feature does Amazon have to support load balancing across read replicas?

A

A Reader Endpoint. This allows for load balancing across read replicas as read replicas auto-scale horizontally. This happens at the connection level.

35
Q

Does Aurora support Cross Region Replication?

A

Yes - but its recommended to use Aurora Global DB instead

36
Q

How many master instances do you get by default with Aurora? What happens if a master instance fails?

A

ONE. If this fails, a read replica is promoted to master

37
Q

How long does an automated RDS snapshot take to complete and what are Recovery Point Implications of this?

A

Approximately 5 minutes. If this is being used as a recovery option then the RPO implications is that we will loose up to 5 mins of data.

38
Q

How many of the 6 copies of your data are needed for Write and Read Operations?

A

4 for writes

3 for reads

39
Q

How many copies of your data are maintained for Aurora and over how many AZ’s?

A

6 Copies, 3 AZ’s

40
Q

What configs need to be made to PosgreSQL and Mysql to enable inflight SSL encryption and where are these made?

A

Postgres: In the rds console and set rds.forcessl=1

MySQL needs to be done at the DB level via a grant query and set Require SSL

41
Q

In RDS, under which activities would we see downtime:

  • Maintenance
  • Scaling in read replicas
  • Changing Instance types
A

All of these will result in some downtime

42
Q

In Aurora, which instance does the writer endpoint point to?

A

The master

43
Q

Which RDS databases can use IAM authentication?

A

Postgres and MySql - and Aurora when using MySQL and Postgres

44
Q

Can data TO RDS be encrypted inflight?

A

Yes, via SSL.

45
Q

What is the default retention period for an RDS automated backup? When a backup is restored, is it restored as a new instance or a an existing instance?

A

7 Days, configurable up to 35. Restores are to a new instance.

46
Q

If your application is making updates to DynamoDB and you also have DAX acting as a cache, do these writes go to DAX or DynamoDB?

A

DAX is a write though cache - the write will go to DAX and then to DynamoDB

47
Q

Is DAX MultiAZ? How many nodes can you have per DAX cluster

A

DAX is multi-AZ and the recommended config is spreading it across 3 AZ’s/ You can have 10 DAX nodes/Cluster.

48
Q

What needs to be done to enable failover in Aurora?

A

Nothing, Its HA native

49
Q

What frequency are automated RDS backups made? How do you restore to a point in time?

A

Daily. Point in time backups are enabled using the transaction logs

50
Q

Which databases does RDS support transparent data encryption for?

A

SQL Server and Oracle

51
Q

What happens to automatically created and manually created RDS snapshots if the RDS instance is enabled?

A

Automatic snaps are deleted. Manually created snaps persist. You will get an option to create a final snap on deletion

52
Q

When using AWS Data Migration service for a heterogenous migration, what other service needs to be used (Hint: “Tool”)

A

The Schema Migration Tool

53
Q

Can you set WCU and RCU values independently for DynamoDB?

A

Yes. Both WCU and RCU need to be set and they do not need to be the same value.

54
Q

What is a DynamoDB Stream? What can it interact with?

A

A DynamoDB stream logs all changes made to DynamoDB data. This can be used to trigger a lambda function that can react to those changes.

55
Q

Whats the role of a database option group?

A

An option group is used to manage database features across many instances

56
Q

For DynamoDB, what time range does a point in time recovery allow you to restore to?

A

5 Minutes to 35 Days

57
Q

What are the:
Start
Incremental
Maximum

Sizes for Aurora storage?

A

10GB Start
10GB increments
64TB max.
Storage is auto provisioned

58
Q

What is a parallel Aurora Query?

A

PQ allows distributed processing of a single query using thousands of CPU’s on the storage layer. Offers faster processing of analytical queries at the expense of higher IO

59
Q

What is the cost model for Dynamo DB?

A

Provisioned capacity for storage usage (or used capacity if auto-scaling).

60
Q

We can deploy read replicas to help with high volumes of read queries. Aside of increasing IOPS and instance sizes for the RDS instance types, what can we do to help improve performance of write heavy queries?

A

For high volume writes, sharding can provide a performance gain - although application logic may need updating.