Section 3 - Relation Databases (RDS) Flashcards
1
Q
When would we use an RDS database?
A
- RDS is generally used for Online Transaction Processing (OLTP) workloads.
2
Q
Difference bwteen OLTP and OLAP?
A
Online Transaction Processing(OLTP):
- Processes data from transactions in real-time e.g. customer orders, banking transactions, payments and booking systems.
- OLTP is all about data processing, and completing large numbers of small transactions in real-time.
Online Analytics Processing (OLAP):
- Processes complex queries to analyze historical data, e.g. analyzing net profit figures from the past 3 years and sales forecasting.
- OLAP is all about data analysis using large amounts of data and complex queries that take a long time to complete.
3
Q
List 6 different types of databases supported by the AWS ecosystem?
A
- RDS
- Aurora
- DynamoDB
- DocumentDB
- ElastiCache
- Neptune
4
Q
What is Amazon Relational Database Service (RDS)?
A
RDS is a service that makes it easy to launch and manage relational databases.
- Supports popular database engines
- Offers high availability and fault tolerance using Multi-AZ deployment option
- AWS manages the database with automatic software patching, automated backups, operating system maintenance, and more.
- Amazon RDS Read Replicas provide enhanced performance and durability for RDS database (DB) instances. They make it easy to elastically scale out beyond the capacity constraints of a single DB instance for read-heavy database workloads.
5
Q
What is Amazon Aurora?
A
Aurora is a relational database compatible with MySQL and PostgreSQL that was created by AWS.
- Supports MySQL and PostgreSQL database engines
- 5x faster than normal MySQL and 3x faster than normal PostgreSQL
- Scales automatically while providing durability and high availability
- Managed by RDS
6
Q
What is Multi-AZ?
A
- It’s an exact copy of your production database in another Availability Zone.
- AWS handles the replication for you.
- Multi-AZ is used for Data recovery
- Multi-AZ not for improving performance.
- You cannot connect to the Standby when the Primary DB is active.
- Which databases can be configured as Multi-AZ:
- SQL Server
- Oracle
- MySQL
- PostgreSQL
- MariaDB
7
Q
What is a Read Replica?
A
- A Read Replica is a read-only copy of the primary database.
- A Read Replica can be located at the same availability zone
- A Read Replica can be Cross-AZ, located in a different availability zone.
- A Read Replica can be cross region, located in a different region.
- A Read Replica can be promoted to be their own databases. This however breaks the replication.
- Read Replica is used for scaling read perfomance, not for DR
- Requires automatic backup: Automatic backups must be enabled in order to deploy a read replica.
- Multiple Read Replicas are supported; MySQL, Oracle, MariaDB,PostgreSQL and SQL server allow you to add up to 5 read replicas to each DB instance.
8
Q
What are the two types of Backups supported by RDS?
A
- Database Snapshot:
- Manual,ad-hoc and user-initiated.
- It provides a snapshot of the storage volume attached to the DB instance
- Automated Backup:
- Enabled by default
- It creates daily backups or snapshots that run during a backup window that you define.
9
Q
RDS Automated Backups Features?
A
- Point-In-Time Recovery
- Recover your database to any point in time within a “retention period” of 1-35 days.
- Full daily Backup
- RDS takes a full daily backup, or snapshot, and also stores transactions logs throughout the day.
- The recovery Process
- When you do a recovery, AWS will first choose the most recent daily backup and then apply transaction logs relevant to that day, up to the recovery point.
- Stored in S3
- Automated backups and snapshots are stored in s3
- Free Storage
- You get free storage space equal to the size of your database. So if you have an RDS instance of 10GB, you will get 10GB orth of storage.
10
Q
RDS Encryption at Rest?
A
- Enable encryption at creation time by selecting the encryption option in the console.
- Encyrption is done using AWS Key Management Service (KMS) AES-256 encryption
- Encryption is applied to all underlying storage, auotmated backups,snapshots,logs, and read replicas.
- Encryption cannot be applied to an unencrypted RDS DB instance. (Must be done at creation)
- Creating an encrypted database from an unencrypted RDS instance
- Take a snapshot (uncrypted)
- Encrypt snapshot
- Restore DB from encrypted snapshot