Section - RDS Databases Flashcards
What is Amazon Relational Database Service (RDS)?
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.
AWS Supported Relational Database Engines?
- Microsoft SQL Server
- Oracle
- MySQL
- PostgreSQL
- MariaDB
- Amazon Aurora
When would we use an RDS database?
- RDS is generally used for Online Transaction Processing (OLTP) workloads.
Difference bwteen OLTP and OLAP?
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.
List 6 different types of databases supported by the AWS ecosystem?
- RDS
- Aurora
- DynamoDB
- DocumentDB
- ElastiCache
- Neptune
What is Multi-AZ?
- 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.
- In the event of a failure, RDS will automatically fail over to the standby instance.
- 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
What is a Read Replica?
- 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.
- Each read replica has it’s own DNS endpoint.
- 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.
What are the two types of Backups supported by RDS?
- 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.
RDS Encryption at Rest?
- 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
RDS Automated Backups Features?
- 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.
The 3 types of Aurora Replicas Available?
- Aurora Replicas
- You can currently have 15 read replicas with Aurora
- MySQL Replicas
- You can currently have 5 read replicas with Aurora MySQL
- PostgreSQL
- You can currently have 5 read replicas with Aurora PostgreSQL
What is Amazon Aurora?
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
- Start with 10 GB, scales in 10-GB increments to 128 TB (Storage Auto Scaling)
- Compute resources can sclae upto 96 vCPUs and 768 GB of memory.
- 2 copies of your data are contained in each Availabilty Zone; with a minimum of 3 Availability Zone. 6 copies of your data.
- Aurora is designed to transparently handle the loss of up to 2 copies of data without affecting database write avilability and up to 3 copies without affecting read availability.
- Aurora storage is also self-healing. Data blocks and disk are continously scanned for errors and repaired automatically.
Aurora Backups?
- Automated backups are always enabled on the Amazon Aurora DB instances. Backups do not impact database performance.
- You can also take snapshots with Aurora. This also does not impact on performance.
- You can share Aurora snapshots with other AWS accounts.
Amazon Aurora Serverless?
- An on-demand; auto-sclaing configuration for MySQL-compatible and PostgreSQL-compatible editions of Amazon Aurora.
- An Aurora Serverless DB Cluster automatically starts up; shuts down; scales capacity up or down based on your application’s needs.
Amazon Aurora Serverless Use Cases?
Aurora Serverless provides a relatively simple, cost-effective option for infrequent, intermittent, or unpredictable workloads.