Databases Flashcards

(41 cards)

1
Q

Which RDS databases can be configured as multi-AZ or single-AZ?

A
  • SQLServer
  • Oracle
  • MySQL
  • PostgreSQL
  • MariaBD
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which RDS database is always multi-AZ?

A

Amazon Aurora

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

Advantages of RDS?

A
  • up and running in minutes (not days)
  • multi-AZ
  • failover capability
  • automated backups
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

When do we use RDS?

A
  • for online transaction processing (OTP)*
  • for customer orders
  • for completing large numbers of small transactions in real time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

When don’t we want to use RDS?

A
  • OLAP (Online Analytical Processing)
  • complex queries
  • large amounts of data
  • data analysis

Instead, use a data warehouse like Redshift, which is optimized for Online Analytics Processing

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

How does Multi-AZ RDS work?

A
  • creates an exact copy of your production database in another AZ
  • AWS handles the replication for you
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What happens in RDS with an Unplanned Failure or maintenance?

A
  • If AWS notices that you lose your primary DB, there is an automatic failover by updating the DNS to point to the secondary DB
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is Multi-AZ for?**

A
  • disaster recovery

- NOT improving performance

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

What are Read Replicas for?

A
  • for improving performance
  • a read-only copy of your database
  • for querying and read-heavy workloads
  • NOT for DR
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Can Read Replicas be Multi-AZ?

A

Yes,

- can be in different regions

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

How many read replicas can you have per DB?

A

5

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

Read Replica basics

A
  • a read-only copy of your primary DB in the same AZ, cross-AZ, or cross-region
  • used to increase or scale read performance
  • great for read-heavy workloads
  • takes the load off your primary DB
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is Amazon Aurora?

A
  • Amazon’s proprietary DB
  • MySQL & PostgreSQL
  • combines speed & availability at a low price point
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How much faster is Aurora than mySQL or PostgreSQL?

A
  • 5x faster than mySQL

- 3x faster than PostgreSQL

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

Aurora Basics

A
  • Storage Auto Scaling - starts with 10 GB. Scales in 10 GB increments up to 128 TB.
  • Compute can scale up to 96 vCPUs and 768 GB of memory.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How redundant is Aurora?*

A

2 copies of your data are stored in each AZ, with a minimum of 3 AZs
- it’s really redundant

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

Scaling Aurora

A

it’s designed to transparently handle the loss of 2 copies of data w/o affecting database write availability and 3 copies of data w/o affecting read availability

18
Q

How is Aurora self-healing?*

A
  • Aurora data blocks and disks are continuously scanned for errors and repaired automatically
19
Q

Aurora Replica limits by type*

A

Aurora Replicas - up to 15 Aurora replicas

  • MYSQL Replicas - up to 5 read replicas
  • PostGres Replicas - up to 5 read replicas
20
Q

Aurora Backups*

A
  • automated backups always enabled
  • backups do not impact database performance
  • can take snapshots (does not impact performance)
  • can share snapshots with other AWS accounts
21
Q

Aurora Serverless *

A
  • on demand
  • auto-scaling
  • for the MySQL and PostGres editions of Aurora
  • automatically starts up, shuts down, scales capacity up and down
22
Q

What is Aurora Serverless for?

A
  • infrequent, intermittent, unpredictable workloads

- for questions on exam where you need the performance of Aurora but have spiky workloads

23
Q

Dynamo DB

A
  • Fully managed
  • A fast & flexible noSQL database for all applications that need consistent, single-digit-millisecond latency at any scale
  • Supports document and key-value data models
24
Q

Dynamo DB use cases

A
  • mobile
  • web
  • gaming
  • ad-tech
  • IoT, etc.
25
Dynamo Facts
1. stored on SSD storage 2. spread across 3 geographically distinct data centers 3. eventually consistent reads (by default) 4. strongly consistent reads (as an option)
26
Eventually Consistent Reads *
consistency between all copies of the database is achieved within 1 second
27
Strongly Consistent Reads *
returns a result that reflects all writes that received a successful response prior to the read.
28
Dynamo DB Accelerator (DAX)
- fully managed, highly available, in-memory cache - 10x performance improvement - reduces request time from milliseconds to microseconds, even under load - no need for developers to manage caching logic - compatible with Dynamo Db API calls
29
Dynamo DB On-Demand Capacity
- pay-per-request pricing - balances cost & performance - pay more per request than with provisioned capacity - use for new product launches
30
Dynamo Security
- encryption at rest with KMS - site-to-site VPN - DirectConnect (DX) - IAM policies and roles - fine-grained access - Cloud Watch & Cloud Trail - VPC endpoints
31
Dynamo DB Transactions *
ACID: - Atomic - all changes to the DB must be performed successfully, or not at all - Consistent - data must be in a consistent state before and after the transaction - Isolated - No other processes can change the data while the transaction is running - Durable - the changes made by a transaction must persist.
32
How do you use ACID w/ Dynamo DB?
- by using transactions - transactions provide atomicity, consistency, isolation and durability across 1 or more tables within a single AWS account or region
33
Use Cases for Transactions in DynamoDB*
- apps that need coordinated inserts, deletes or updates to multiple items as part of a single logical business operation - financial transactions, managing orders - building multi-player game engines - coordinating actions across distributed services - up to 25 items or 4 MB of data per transaction
34
What does ACID boil down to?*
All or nothing. No partially successful updates.
35
3 options for reads
- eventual consistency - strong consistency - transactional
36
2 options for writes:
- standard | - transactional
37
Dynamo On-Demand Backup & Restore
- full backups at any time - zero impact on table performance or availability - consistent w/i seconds & retained until deleted - operates in the same region as the source table
38
Dynamo Point in Time Recovery (PITR)
- restore to any point in the last 35 days - incremental backups - not turned on by default - latest restorable point - 5 minutes in the past
39
Dynamo DB Streams
- time-ordered sequence of item-level changes in a table - FIFO - every time your data changes it comes w/ a sequence number - for inserts, updates and deletes - stored for 24 hours - broken into shards - can combine Lambda functions for functionality like stored procedures
40
Shards
collections of stream records with sequential numbers
41
Dynamo Global Tables
a way of replicating your Dynamo DB tables from one region to another - managed multi-master, multi-region replication - great for globally distributed applications* - based on Dynamo DB streams (must be enabled to use Global tables) - multi-region redundancy for recovery or high availability* - no need to re-write your app, just go into the console and turn it on* - replication latency under 1 second