RELATIONAL DATABASE SERVICE (RDS)
Database Refresher & MODELS - PART1 (8:51), PART2 (14:45)
SQL vs NoSQL
what is sql?
what is nosql?
Relational (SQL) Database
Relational Database, e.g. MySQL, Postgres
Non-Relational (NoSQL) Database
Key-Value Database, e.g. Redis, Google Bigtable, Amazon DynamoDB
Wide Column Store, e.g. Google Bigtable, Amazon DynamoDB
Document Database, e.g. MongoDB, Amazon DocumentDB
Column Database, e.g. BigQuery, Amazon Redshift
Graph Database, e.g. neo4j, Amazon Neptune
ACID vs BASE (11:02)
CAP Theorem
what is cap theorem?
The CAP theorem states that any networked shared-data system can have at most two of three desirable properties:
- consistency (C) equivalent to having a single up-to-date copy of the data (linearizable);
- high availability (A) of that data (system always accepts updates);
- and tolerance to network partitions (P)
Ref:
ACID
BASE
Databases on EC2 (13:08)
Why?
Why not?
Databases on EC2 - Example
[DEMO] Splitting Wordpress Monolith => APP & DB (18:01)
Relational Database Service (RDS) Architecture (11:39)
RDS - DBSaaS
RDS - Architecture
RDS - Costs
[DEMO] Migrating EC2 DB into RDS - PART1 (18:20)
[DEMO] Migrating EC2 DB into RDS - PART2 (12:58)
Relational Database Service (RDS) MultiAZ - Instance and Cluster (11:54)
RDS - Multi AZ - Instance
RDS - Multi AZ - Instance - Failover
RDS - Multi AZ - Instance - Summary
RDS - Multi AZ - Cluster - Architecture
RDS - Multi AZ - Cluster - Summary
compare rds multi az instance and multi az cluster.
-
Multi AZ Instance:
- 1 Primary instance
- 1 Standby replica:
- can’t be used for reads / write 👈 not for performance scaling, only for availability
- kept in sync Synchronously with the primary instance
-
Multi AZ Cluster:
- 1 Writer DB instance
- 2 Reader DB instances:
- can be used for read 👈 limited read scaling
- kept in sync Asynchronously with the Writer instance 👈 replication lag (aka Replica lag)
RDS Automatic Backup, RDS Snapshots and Restore (8:52)
RDS Backups - General
what kind of backups does rds support?
RDS support 2 kind of backup:
- Manually Snapshots
- Automated Backups
what is rds manually snapshot?
A backup performed manually and live past the termination of an RDS instance
what is rds automated backups?
Backups performed automatically by RDS:
- 0 to 35 days retention.
- RDS also use S3 to store transaction logs every 5 minutes.
👉 With RDS Automated Backups, RPO can be only 5 minutes. 💪
RDS Backups - Cross-Region
RDS Restores
where is a rds snapshot restored to?
RDS Snapshot is restored to a new RDS instance, with new address.
how long is an rds restore?
RDS Restores aren’t fast. Be careful with RTO.
RDS Read-Replicas (6:36)
RDS Read-Replicas are kept in sync asynchronously with the primary instance
RDS Read-Replicas - Performance Improvement
RDS Read-Replicas - RPO/RTO Improvement
what is the impact of rds read-replicas to rpo/rto?
Read-Replicas offer:
- near 0 RPO.
- very low RTO 👈 RRs can be promoted quickly.
can read-replicas solve data corruption?
No. Data corruption will be replicated to RRs.
[DEMO] MultiAZ & Snapshot Restore with RDS - PART1 (14:05)
[DEMO] MultiAZ & Snapshot Restore with RDS - PART2 (12:07)
RDS Data Security (7:03)
RDS Data Security
RDS Data Security - Extra Security
RDS KMS Encryption & TDE
IAM Authentication RDS
RDS Custom (5:22)
RDS Custom - Fill the gap between DB-on-EC2 and RDS.
RDS Custom - Shared Responsibility
Aurora Architecture (13:44)
Aurora - Key Differences
Aurora - Storage Architecture - 6 replicas
Aurora - Storage Architecture - Summary
Aurora - Endpoints
Aurora - Cost
Aurora - Restore, Clone & Backtrack
👉 Aurora implements a number of radical design changes which offer significant performance and feature improvements over other RDS database engines.
Aurora Serverless (9:52)
Aurora Serverless - Concepts
Aurora Serverless - Architecture
Aurora Serverless - Use Cases
[DEMO] Migrating to Aurora Serverless [DENT DO THIS DEMO, IT WON’T WORK, UPDATING to SERVERLESSv2] (14:47)
Aurora Global Database (5:08)
Aurora Global Database - Architecture
how long is aurora global database's replication between regions?
Less than or equal 1s
Aurora Global Database - 5 secondary regions - each regions can have 16 read-only replicas
Aurora Multi-master writes (7:51)
Aurora Multi-Master - All instances are R/W
Aurora Multi-Master - Architecture
Aurora Single-Master - Failover
Aurora Multi-Master - Failover
Relational Database Service (RDS) - RDS Proxy (9:47)
RDS Proxy - Why?
why use rds proxy?
-
Opening/Closing DB Connections consume resources.
- Increase latency.
- Especially with serverless architecture.
-
Handling failure of DB instance is hard:
- Doing it within application add risks
👉 RDS Proxy solves these problems.
how rds proxy works?
- sits between your application and your relational database
- to efficiently manage connections to the database
👉 improve scalability of the application.
RDS Proxy - Architecture
RDS Proxy - When?
RDS Proxy - Key Facts
Database Migration Service (DMS) (11:03)
Database Migration Service (DMS) - Summary
can dms be used for on-premises db?
Yes and No.
- DMS can be used to migrate from/to on-premises DB if the other endpoint were on AWS.
- If both endpoints are on-premise, DMS can NOT be used.
DMS - Architecture
where is dms run?
On a replication instance
(an EC2 instance).
which part of dms really run the migration?
DMS Task:
- Full load
- Full load + CDC
- CDC only
Schema Conversion Tool (SCT)
aws schema conversion tool (sct) vs aws dms schema conversion?
-
AWS Schema Conversion Tool (SCT):
- convert your existing database schema from one database engine to another.
- used to convert data warehouse schemas, big data frameworks, application SQL code, and ETL processes.
-
AWS DMS Schema Conversion:
- a web-version of the AWS SCT. [1]
- supports less database platforms and provides more limited functionality compared
DMS & Snowball ☃️