Databases Flashcards

1
Q

DynamoDB

A
  • Fully managed, nosql, massive scale (1000000 rps)
  • Max object size 400KB
  • Capacity provisioned (WCU, RCU & autoscaling) or on-demand
  • Reads can be eventually or strongly consistent
  • Supports transactions across multiple tables (ACID)
  • Backups and point-in-time recovery available
  • Integrated with IAM for security
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

DynamoDB - Primary Keys

A
  • Must be unique
  • Partition key only
  • Partition key + sort key
    • Data grouped by partition key, the timestamp is an example of the good sort key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

DynamoDB - Indexes

A
  • In order to query an attribute must create an index of it
  • LSI - Local Secondary Index
    • Same partition key, the alternative sort key
    • Must be added at creation
  • GSI - Global Secondary Index
    • Different partition and sort key
    • Can be defined after the table creation
    • Needs provisioned throughput per index, extra $
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

DynamoDB - TTL

A

Can expire rows

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

DynamoDB - Streams

A
  • React to change in tables in real time
  • 24-hour retention
  • Can send to lambda, sqs, sns, ec2 and more
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

DynamoDB - Global Tables

A
  • Active Active xregion replication, many regions
  • Must enable streams
  • Good for low latency, DR
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

DynamoDb - DAX

A
  • DynamoDB Acceleration, aka cache
  • No application code, directly integrated with DynamoDB
  • Good for handling hot key problem
  • 5 min TTL by default
  • Multi AZ, recommended min 3 node for PROD
  • Secure (KMS, IAM, VPC, CloudTrail)
  • Up to 10 nodes in the cluster
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Amazon ElasticSearch (ES)

A
  • Not serveless, need to provision servers

- Must specify instance types, must be Multi-AZ

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

ElasticSearch + DynamoDB

A

Searching + Fast key-value store and retrieval

Store in Elasticsearch using streams and lambda

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

ES + CW

A

cw + subscription filter + lambda + es - real time
cw + subscription filter + kinesis + es - near real time

build own analytics and dashboard using kibana

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

RDS

A
  • PostgreSQL, MySQL, MariaDB, Oracle, MS SQL Server

- Managed but requires provisioned servers

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

RDS VPC

A

Must be in VPC in private subnet, access controlled using SGs

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

RDS Storage

A

EBS (gp2 or io1), can enable auto-scaling

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

RDS Recovery

A
  • Automated backups, pit recovery. Backups expire.

- Snapshots manual, can make copies of snapshots xregion

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

RDS Events

A
  • Get notified via SNS about operations, outages, backups etc
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

RDS Multi AZ

A
  • Master + Standby (Sync replication)
  • One dns name
  • Reads/writes only to master
  • In case of failover, dns automatically will failover to standby
17
Q

RDS Read Replicas

A
  • Increase Read throughput
  • Eventual consistency, so async replication to read replicas
  • Can be xregion
18
Q

Aurora

A
  • PostgreSQL and MySQL

- Backup/restore/snapshot same as RDS

19
Q

Aurora Storage

A
  • Automatically grows in 10GB increments up to 64TB
  • 6 copes of data across 3 AZ
  • 4 out of 6 needed for writes
  • 3 out of 6 needed for reads
20
Q

Aurora Replication

A
  • Up to 15 RR with Read endpoint to access them all
  • Xregion replication, entire database (Unlike DynamoDb)
  • Self-healing with Peer to Peer replication
21
Q

Aurora + S3

A
  • Efficiently load/offload to/from S3
22
Q

Aurora Master

A
  • Can failover within 30 seconds

- Can write only to master, using writer endpoint