Databases Flashcards
You can use ___________ to get information on the most accessed and most throttled items on a DynamoDB table or Global Secondary Index
CloudWatch Contributor Insights for Amazon DynamoDB
True or False: RDS can launch Multi-AZ databases, where multiple identical databases are spun in various AZs and when a request for data comes RDS dynamically determines which DB will be accessed
False, on the RDS Multi-AZ database you have one primary DB and multiple secondary DBs, and if your primary DB fails you can automatically switch over to the second database.
Whats the use-case difference between Read Replicas and Multi-AZ
Read Replicas are supposed to reduce the load on your main DB and help stop throttling and latency and are Asyncronous, while Multi-AZ is supposed to be used to mantain the reliability of the DB, reducing the chance it is off the air, and are synchronous. Additionally, read replicas can be Cross-Region, while Multi-AZ cannot
What RDS databases can have Cross-Region Replicas? Which ones can’t?
Can: Aurora, Oracle, MariaDB, PostgreSQL and MySQL
Can’t: SQL Server
What is a DynamoDB Global Table?
A global table is a group of DB replicas spread across multiple regions that are treated as a single DB, with all their data being automatically sinchronized between each other. All tables have the same primary key schema and table name.
What is RPO and RTO?
RPO: Recovery Point Objective, how much data you lose in case of failure
RTO: Recovery Time Objective, how much time it takes to come back online after failure
What are the 4 most common disaster recovery strategies? Rank them by their cost and how much time it takes for them to act
Backup: Cheapest and slowest (few hours RTO). You create a snapshot if the data in a moment in time and recreate the DB based on this snapshot.
Pilot Light: 2nd Cheapest and slowest (10s of minutes RTO). Create a copy of your core workload infrastructure on another region, mantaining only essential replication services on. In case of disaster you switch to that solution.
Warm Standby: 2nd most expensive and fastest (minutes of RTO). Similar to pilot light, but you mantain a fully functional copy of the DB in another region.
Multi-site active: Fastest and most expensive. You run your DB in many regions simultaneously, making it have the fastest RTO but the most complex, as it creates issues of data corruption and synchronization.
What are some examples of Pilot Light services?
-AWS DynamoDB Global Tables
-AWS Aurora DB Global Tables
-Amazon RDS Read Replicas
AWS Auto Scaling is compatible with which AWS Database services?
DynamoDB and AuroraDB
What are the differences between OLTP and OLAP databases?
OLTP (Online Transaction Processing): Are databases focused on recording transactional operations. This involves lots of smal Insert, Delete and Update operations, and queries made to it are simple and short;
OLAP (Online Analytical Processing): Are databased focused on the analysis of the transations stored in OLTP DBs. They must be able to perform larger, analytical queries to create different summaries of multidimentional data.
List some aspects of Relational Database Management that RDS solves when compared to local DB solutions.
- Hardware purchasing
- OS and DB management and setup
- Patching
- Backups (Performed automatically every 5 min adn stored for 35 days)
- Multi-AZ for reliability
- Scaling Capacity
When creating an RDS DB what are the 2 main factors you need to decide for your DB?
- The type of instance the DB will run on (gp2 or io1);
- The DB engine to be used
How does the Billing for RDS work?
There are 3 factors to RDS pricing:
- The cost of the underlying instance (affected by it being On-Demand or Reserved);
- The cost of storage (per gb) and I/o (per number of operations);
- The amount of data transfered to another region or to the internet.
What are disadvantages Aurora has compared to RDS?
- Accepts only PostgreSQL and MySQL
- Is more expensive
True or False:
Amazon Aurora automatically backups your data to S3, allwoing you to revert to any point in time in the last 35 days.
True
What are some advantages of Aurora when compared with RDS?
- Over 5x performance increase on MySQL and 3x performance increase on PostgreSQL
- Highly Available by default, with 6 replicas across 3 AZs, with 4 copies being needed for write and 3 for reading and possessing “self-healing” property where corrupted data is fixed by reading from the copies
True or False: Both RDS and Aurora accept unlimited read-replicas, as long as you pay for them
False, max number of read replicas for both are 15
True or False: The billing for Aurora is the same as for RDS, with the only difference being that when paying for the underlying instance, Aurora also has the Serverless option, which makes it so you pay for the capacity of the DB instead.
True
Classify the following statements regarding DynamoDB as True or False:
-DynamoDB is a Document based NoSQL database
-It’s max object size is 400kb
-It can be implemented in a provisioned strategy or on demand
-Read operations performed on it are always consistent
-Performs backups automatically and offers point-in-time restoration
-Has 2 table classes: Standard and infrequent access (IA)
-False: It’s a key-value NoSQL database
-True
-True
-False, reads performed are eventually consistent (Strong consistency)
-False, DynamoDB offers backups, but they aren’t performed automatically
-True
What the difference between a DynamoDB LSI and a GSI?
- A Local Secondary Index (LSI) allows you to change your sort key, and must be created along with the table. It costs nothing.
- A Global Secondary Index allows you to change bot your partitition key and your sort key, and can be defined after the table is created. It costs extra (counts as a new table over the same table in regards to provisioning reads ans writes)
True or False: To use DynamoDB Global Tables you must enable DynamoDB Streams
True
How can you make it so a new DynamoDB entry is immediately deleted after a predefined amount of time?
You can define a TTL for your table entries
True or False: DynamoDB Streams can store data for up to a Week
False, up to 24 hours
What are the use cases for DynamoDB DAX?
DAX is useful as a cache to DynamoDB for storing reads or queries requested recently (TTL 5min), solving the hot key problem. It is also Multi-AZ and secure (Encryption at rest with KMS)