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.
What is DynamoDB?
Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. DynamoDB lets you offload the administrative burdens of operating and scaling a distributed database, so that you don’t have to worry about hardware provisioning, setup and configuration, replication, software patching, or cluster scaling.
What NoSQL data models support DynamoDB?
Document and key-value data models.
What kind of storage does DynamoDB uses?
Stored on SSD storage.
How is DynamoDB spread?
Spread across 3 geographically distinct data centers.
What Read Consistency models does DynamoDB supports?
Eventual Consistent Reads (default) Strongly Consistent Reads.
What is “Eventual Consistent Reads”?
Consistency across all copies of data is usually reached within a second.
What is “Strongly Consistent Reads”?
A Strongly Consistent Read returns a result that reflects all writes that received a successful response prior to the read.
DynamoDB pricing
Provisioned Throughput Reserved capacity (if applicable) Data storage Data transfer (only across AWS Regions)
What is RedShift?
Amazon Redshift is a fast, fully managed, petabyte-scale data warehouse that makes it simple and cost-effective to analyze all your data using your existing business intelligence tools. Start small for $0.25 per hour with no commitments and scale to petabytes for $1,000 per terabyte per year, less than a tenth the cost of traditional solutions.
What configurations does RedShift support?
Single node (160GB) Multi-node: - Leader node (manage client connections and receives queries) - Compute node (store data and perform queries and computations). Up to 128 Compute Nodes.
What are the advantages of RedShift (“10 times faster”)
Columnar Data Storage Advanced Compression Massively Parallel Processing
RedShift pricing
Compute node hours Backup Data transfer (only within a VPC)
What AWS platform is most suitable for OLTP?
RDS/DynamoDB
When replicating data from your primary RDS instance to your secondary RDS instance, what is the charge?
You are not charged for the data transfer incurred in replicating data between your source DB instance and Read Replica.
What is the maximum size RDS volume can you have by default for Provisioned IOPS and General Purpose SSD storage types?
Amazon RDS supports database storage size up to 16TB for MySQL, MariaDB, Oracle, SQL Server, and PostgreSQL engines, for Provisioned IOPS and General Purpose SSD storage types (since 2017).
In RDS, when using Multi-AZ, can you use the secondary database as an independent read node?
No.
Which types of Aurora Replicas are available?
Aurora Replicas (currently 15) MySQL Read Replicas (currently 5)
Aurora Scaling
- 6 copies of data: 2 in each of a minimum of 3 AZs. - Designed to handled transparently the loss of up to 2 copies of data without affecting write availability and 3 without affecting read availability. - Self-healing (data blocks and disks continuously scanned)
Are automated backups enabled by default in RDS databases?
Yes
Can you select the AZ in which to deploy an RDS database at creation time?
Yes
What is the maximum size RDS volume you can have by default when using Amazon RDS Provisioned IOPS storage with MySQL or Oracle?
16TB
Must you specify a port number or protocol when adding a rule to an RDS Security Group?
No
Are RDS reserved instances available for Multi-AZ deployment?
Yes
What happens to the I/O operations of a single-AZ RDS instance during a database snapshot or backup?
I/O may be briely suspended while the backup process intializes (typically under a few seconds), and you may experience a brief period of elevated latency.
In RDS what’s the maximum value I can set for my backup retention period?
35 days
Which node in the response from the Amazon RDS API do I need to check if I want my application to check RDS for an error?
Error node
When do changes to the RDS backup window take effect?
Immediately
When you have deployed an RDS database into multiple AZs, can you use the secondary DB as an independent read node?
No
Is there a charge associated with data transfering when replicating data from the primary RDS instance to the secondary RDS instance?
No
Can you “force” a failover for any RDS instance that has Multi-AZ configured?
Yes, rebooting the instance.
RDS runs on virtual machines. Can you login to the OS?
No
As the user, are you responsible to patch your AWS DB and OS?
Not for any AWS RDS services
Is RDS serverless?
Yes except for Aurora
Describe red shift backups?
1 day enabled by default
maximum 35 days
maintains 3 copies
can asynchronously replicate your snapshots to S3 in another region
you have an aurora snapshot. Can you share it with another account?
yes
What types of aurora replicas are available?
Aurora and MySQL replicas
How is aurora backed up?
automated backups turned on by default
snapshots
What DB perfomance enhancer also provides multi az?
elasticache Reddis
Which of the following DynamoDB features are chargeable, when using a single region?
Read and Write Capacity
Storage of Data
Which of the following data formats does Amazon Athena support? (Choose 3)
JSON
Apache ORC
Apache Parquet
MySQL installations default to port number ________.
3306
Which of the following AWS services is a non-relational database?
DynamoDB
If you want your application to check RDS for an error, have it look for an ______ node in the response from the Amazon RDS API.
Error
Which AWS DB platform is most suitable for OLTP?
RDS