Databases Flashcards
What database services are available on AWS?
RDS-OLTP DynamoDB (NoSQL) RedShift (OLAP) Elasticache (in memory caching) DMS
What OLTP databases are available in RDS?
SQL
MySQL
Postgre
Oracle
MariaDB
Aurora
What cache services are available in RDS Elasticache?
Memcached Redis
What is Elasticache?
Amazon ElastiCache is a web service that makes it easy to deploy, operate, and scale an in-memory data store or cache in the cloud.
What is DMS?
AWS Database Migration Service is a web service you can use to migrate data from your database that is on-premises, on an Amazon Relational Database Service (Amazon RDS) DB instance, or in a database on an Amazon Elastic Compute Cloud (Amazon EC2) instance to a database on an AWS service.
What are the types of backups supported on RDS?
Automated Backups and Database Snapshots
How does Automated Backups work?
Automated Backups allow you to recover your DB to any point in time within a “retention period”. Retention Period can be between 1 and 35 days. Automated Backups will take a full daily snapshot and will also store the transaction logs throughout the day.
Where is stored the Automated Backup data? How much does it cost?
The backup data is stored in S3 and you get free storage space equal to the size of your database.
How does RDS Snapshots work?
DB Snapshots are done manually. They are stored even after the original RDS instance is deleted, unlike Automated Backups.
What happens when you restore a backup?
When ever you restore either an Automated Backup or a manual Snapshot, the restored version of the database will be a new RDS instance with a new endpoint.
Can an existing RDS DB be encrypted?
Encrypting an existing DB instance is not supported. To use RDS encryption for an existing database: - Create a new DB instance with encryption enabled and migrate your data into it. Or, - 1) Create a snapshot of the unencrypted database instance. 2) Copy the snapshot to a new, encrypted snapshot. Enable encryption and specify the desired KMS key as you do so. 3) Restore the encrypted snapshot to a new database instance.
What is Multi-AZ RDS?
Multi-AZ allows to have an exact copy of your production database in another AZ. In the event of planned DB maintenance, BD instance failure, or an Availability Zone failure, Amazon RDS will automatically failover to the standby.
What is the use case for Multi-AZ RDS
Multi-AZ is for disaster recovery. It is not used for improving performance. For performance improvement, Read Replicas are needed.
Can Multi-AZ be used to performance improvement?
No. Multi-AZ is for disaster recovery. It is not used for improving performance. For performance improvement, Read Replicas are needed.
What is a Read Replica?
Read Replica uses asynchronous synchronization to create an exact copy of the DB that can be actually read.
For which RDS databases Multi-AZ is supported?
SQL Sever Oracle MySQL Server PostgreSQL MariaDB (Aurora has its own replica mechanism)
For which RDS databases “Read Replicas” is supported?
MySQL MariaDB PostgreSQL Amazon Aurora
What is the use case for Read Replicas?
Read Replicas are used for scaling, not for disaster recovering.
How many Read Replicas can be added to a RDS BD?
Amazon RDS allow you to add up to 5 read replicas to each DB Instance.
Can you have Read Replicas of Read Replicas?
Yes, but watch out for latency.
How applications can use Read Replicas?
The read replica operates as a DB instance that allows only read-only connections; applications can connect to a read replica just as they would to any DB instance.
Can Read Replicas be Multi-AZ?
Yes. You can have read replicas that have Multi-AZ.
Can Multi-AZ databases have Read Replicas?
Yes. You can create Read Replicas of Multi-AZ source databases.
Can Read Replicas be promoted, so that they become standalone DB Instances?
Yes. This breaks the replication.
Can you have cross-region Read Replicas?
Yes. You can have a read replica in a second region.
What is one of the main advantages of DynamoDB over RDS?
DynamoDB offers Push Button scaling, meaning that you can scale your database on the fly, without any down time. For RDS, scaling is not so easy and you usually have to use a bigger instance size or to add a read replica.
How can you scale up in RDS?
It’s a manual process. - Snapshot, Restore changing instance size. - Read replica with bigger size.
Can you scale out in RDS?
In RDS, you can only scale up. You can scale out, but only in terms of reads, not writes.