Database Services Flashcards
What is the advantage of relational database?
You don’t have to understand upfront how you’re going to query the data.
What’s the difference between OLTP and OLAP?
OLTP is a relational database optimized for fast, frequent transactions. OLTP database may have intense memory requirements so that it can store frequently accessed portions of tables in memory for quick access.
OLAP is a relational database optimized for large, complex queries. OLAP databases tend to have heavy compute and storage requirements, as complex query requires more computation power and it’s common to aggregate multiple database into a single OLAP database.
What does AWS RDS provide?
AWS RDS takes care of
- Setup the database system
- Perform backup
- Ensure high availability
- Patch DB and OS
Which storage engine of MySQL or MariaDB should be used with RDS?
InnoDB, as it is the only one compatible with RDS-managed automatic backups.
The other storage engine is MyISAM.
What’s the use case of RDS for PostgreSQL?
PostgreSQL advertises itself as the most Oracle‐compatible open source database. This is a good choice when you have in‐house applications that were developed for Oracle but want to keep costs down.
What’s the use case of Amazon Aurora?
Aurora is Amazon’s drop‐in binary replacement for MySQL and PostgreSQL, which offers better write performance by using a virtualized storage layer.
How to calculate IOPS based on throughput for RDS?
MySQL and MariaDB has a page size of 16 KB. The rest DBs’ page size is 8 KB.
To get 100MB/s throughput,
- MySQL and Maria DB needs 6,400 IOPS
- The rest needs 12,800 IOPS
How RDS allocate IOPS based on storage size with General Purpose SSD?
For each gigabute of data that you allocate to a volume, RDS allocate a baseline performance of 3 IOPS.
A 20 GB volume would get 60 IOPS, whereas a 100 GB volume would get 300 IOPS. A 5,334 GB volume would get 16,000 IOPS.
What is burst IOPS with General Purpose SSD?
Volumns smaller than 1 TB can temporarily burst to 3,000 IOPS. The duration of the burst is determined by the size of the volumn.
For example, with a 200 GB volume, the burst duration would be 2,250 seconds, or 37.5 minutes.
What are four storage options for RDS?
- General Purpose SSD (gp2)
- Provisioned SSD (io1)
- Throughput-Optimized HDD (st1)
- Cold HDD (sc1)
How many read replicas does RDS support?
- Amazon Aurora supports up to 15.
How to make RDS highly available?
Enable Multi-AZ deployment.
Enabling Multi-AZ deployment will cause significant performance hit, so be sure to do it during a maintenance window.
How long does it take for RDS to failover with a Multi-AZ deployment?
Within 2 minutes.
What’s the difference between read replica and standby instance of a primary database?
Data replication:
- Read replica: asynchronous
- Standby instance: synchronous
Endpoint:
- Read replica: separate endpoint
- Standby instance: share the same endpoint from the primary database
Serve Requests:
- Read replica: serve readonly requests
- Standby instance: does not serve any requests until failover
What are the two options for Multi-AZ with Amazon Aurora?
- Single-Master
- Multi-Master
What is the RPO and RTO of Point-in-Time Recovery (PITR) of RDS?
5 minutes or under.
PITR archives database change logs to S3 every 5 minutes.
Restoring to a point-in-time can take hours, depending on how much data is in the transaction log.