Relational Database Service Flashcards

1
Q

Two types of DB transaction models and what do they prioritize ?

A

ACID = Consistency

Base = Availability

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

What does ACID stand for ?

A

Atomic - All or No components of a transaction succeeds or fails

Consistent- Transaction move the database from one valid state to another

nothing in-between is allowed

Isolated- If multiple transactions occur at once, they don’t interfere with each other

Each executes as if it’s the only one

Durable- once committed transaction are durable . stored on non-volatile memory, resilient to power outages or crashes

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

What does Bases stand for ?

A

Basically Available- Read and Write are available ‘as much as possible’ but without any consistency guarantees- kinda,maybe

Soft State - The database doesn’t enforce consistency, this is offloaded onto the application /user

Eventually Consistent - if we wait long enough, reads from the system will be consistent

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

Database on EC2

A

mostly always a bad idea so much you have to question it’s use case every being needed

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

What is Relational Database Service (RDS) ?

A

DatabaseServer-as-a service

Managed database instance (1+ databases)

multiple engines Mysql, mariaDB, postgreSQL , oracle, microsoft SQL server

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

RDS MultiAZ

A

standby read replica incases of AZ outages, primary failure , software patching etc.

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

Can RDS MuliAZ read replicas be used for extra capacity ?

A

No standby’s can never be directly used

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

When a fail over happens what is the time it takes to move to the replica instance?

A

failover 60-120 seconds highly available but not fault tolerant

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

Cost for RDS MultiAZ

A

No free-tier extra cost for standby replica usually 2x the price

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

Recovery Point Objective (RPO)

A

Time between last backup and incident

Amount of Maximum data loss

influences technical solution & cost

Generally lower value cost more

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

Recovery Time Objective(PTO)

A

Time between the DR even and full recovery

Influenced by process,staff, tech and documentation

Generally Lower value cost more

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

How are RDS backups taken

A

taken from the standby instance if MultiAz is enabled if not enabled taken from Main instance first snapshot is a full snapshot then after onwards they are taken incrementally

backups is restored and transaction logs are ‘replayed’ to bring DB to desired point int time

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

How often are snapshots and backups taken ?

A

RDS provides automatic backups or manual snapshot when ever your specific

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

How Is RDS able to restore from any point into time ?

A

RDS captures transaction logs every 5 mins which captures the transactions done on the databases

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

Where are snapshots, backups, and logs stored ?

A

Aws managed s3 bucket

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

Read Replicas

A

you can have 5 direct read-replicas per DB instance

they have their own endpoints and can only be used for read operations

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

What is the problem with creating a read-replica from a read-replica ?

A

lagging starts to be problem

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

How can read replicas improve RTO recovery ?

A

any one of the read replicas can be promoted to writes improving RTO

19
Q

If a failure happens because of a data corruption would there be any difference in how you would restore that DB instance ?

A

yes you can replicate the data corruption if you just promote a read replica to a write instance

for that you would default to backups and snapshots

20
Q

Resiliency of read replicas

A

global availability improvements global resilience

21
Q

How is RDS encryption handled in Transit ?

A

Encryption can be be set via SSL/TLS and be set to a mandatory on a per user basis

22
Q

How is RDS encryption at rest handled ?

A

RDS supports EBS volume encryption using KMS

Handled by Host/EBS the RDS instance is not aware of encryption

23
Q

Can RDS encryption be removed once added ?

A

no

24
Q

Once encryption on RDS is enable what other resource would the encryption extend to ?

A

Storage, Logs , Snapshots and replicas

25
Q

Are there other Options for RDS encryption

A

RDS MySQL and RDS Oracle supports Transparent Data Encryption (TDE)

Encryption is handled within the DB engine

RDS Oracle supports integration with CloudHSM

26
Q

How does Amazon RDS IAM Authentication Work ?

A

RDS local DB account configured to use AWS Authentication Token

Policy attached to users or roles maps that IAM identity onto the local RDS user

generate-db-auth-token creates a token with 15 min Validity which can be used in place of a DB user password

27
Q

Aurora Architecture

A

uses a ‘Cluster’

a signinle primary instance with 0 or more replicas

No local storage uses cluster Volume

28
Q

When to use Aurora ?

A

Any needs beyond RDS singleAz (micro) Aurora offers better value

29
Q

Aurora Charges

A

No free-tier option

compute - hourly charge per sec 10 min minimum

storage- gb month consumed IO cost per request

100% DB size in backups are included

30
Q

Aurora Serverless

A

Scalable -ACU Aurora capacity units

Aurora Serverless Cluster has a min & max ACU

cluster adjust based on load can go to 0 and be paused

31
Q

How is Aurora serverless billed ?

A

consumption based per-second basis

same resilience as aurora 6 copies across AZ

32
Q

you have an application where your’re billing a user a set $ amount per month per license to the application where income load = incoming revenue what resource would you use ?

A

Aurora

33
Q

What are some other use cases for Aurora serverless?

A

infrequently used applications

new applications

variable workloads

unpredictable workloads

development and test database

34
Q

Database Migration Service(DMS)

A

managed DMS

runs using a replication instance

sources and destination endpoints points at => sources and target database

one endpoint must be on AWS

35
Q

DMS Schema Conversion Tool (SCT)

A

SCT is used when converting one database engine to another

including DB → s3 (migration using DMS)

36
Q

What type of Database are compatible with DMS Schema Conversion Tool (SCT)

A

works with OLTP db type (mySQL, MSsql, oracle)

and OLP(Teradata , oracle, vertica , Green plum )

37
Q

When would you not use DMS Schema Conversion Tool (SCT) ?

A

When migrating between DB’s of the same type

38
Q

When would you use DMS and SnowBall

A

when migrations are multi-TB in size

moving dtata over networks takes time and consume cpacity

DMS can utilise snowball

39
Q

What’s the process of using DMS with snowball ?

A
  1. use SCT to extract data locally and moveto a snowball device
  2. ship the device back to AWS they load onto an s3 bucket
  3. DMS migrates from s3 into the target store
  4. change data capture(CDC) can capture changes, and via s3 intermediary they also write to the target databases
40
Q

Aurora Global Database

A

up to 16 read only Replicas in secondary regions

currently Max is 5 secondary regions

the other region replicas can also be used for read during normal business operations

41
Q

Why would you user Aurora Global Database ?

A

cross-region Disaster recovery and business continuity

42
Q

How log does it take to Aurora Global Database to replicate data to the secondary region ?

A

1 s or less replication between regions

No impact on DB performance

43
Q

What is -Aurora Multi-Master and how does it work ?

A

In multi-master mode all instances are R/W

changes get prosed to all nodes

and quorum of nodes have to be in agreement for the changes to be accepted

if rejected the user would get an error

if approved the changes get replicated and the instances update their memory-caches

44
Q

If you were trying to build a fault tolerant application what AWS DB service would you use to build it ?

A

Aurora Multi master since all instances are r/w any one of the instances can be promoted when a writer fails it can immediately send operations to another instance meaning little or if any disruption