Databases Flashcards
What database services are available on AWS?
RDS (OLTP) DynamoDB (NoSQL) RedShift (OLAP) Elasticache (in memory caching) DMS
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.
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 Multi-AZ databases have Read Replicas?
Yes. You can create Read Replicas of Multi-AZ source databases.
How can you scale up in RDS?
It’s a manual process.
- Snapshot, Restore changing instance size.
- Read replica with bigger size.
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.
What AWS platform is most suitable for OLTP?
RDS/DynamoDB
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)
What are the available RDS Database types?
- SQL Server
- Oracle
- MySQL
- PostgreSQL
- MariaDB
- Amazon Aurora
For which type of workloads is RDS suitable?
For OLTP workloads (not OLAP)
For which type of workloads is Redshift suitable?
For OLAP. Use Redshift for DWH and OLAP tasks.
What’s the primary use case for RDS Read Replicas?
Read Replicas are used to scale read performance, not for disaster recovery. Great for read-heavy workloads, to take the load off your primary database for read-only workloads (e.g., Business Intelligence reporting job)
What’s required in order to deploy a read replica?
Automatic backups must be enabled in order to deploy a read replica
Are multiple Read Replicas supported?
Yes. MySQL, MariaDB, PostgreSQL, Oracle and SQL Server allow you to add up to 5 read replicas to each DB instance
What is RDS Multi-AZ?
- An exact copy of your production database in another AZ
- Used for disaster recovery
- In the event of failure, RDS will automatically failover to the standby instance
What’s the primary use case for RDS Multi-AZ?
RDS Multi-AZ is used for disaster recovery (not to improve performance)
Where can the Read Replica live?
In the same AZ, cross-AZ, or cross-region
Characteristics of the Aurora copies
2 copies of your data are contained in each AZ, with a minimum of 3 AZ. 6 copies of your data
Can you share Aurora snapshots?
Yes. You can share Aurora snapshots with other AWS accounts
What types of replicas are available for Aurora?
3 types of replicas are available. Aurora replicas, MySQL replicas, and PostgreSQL replicas. Automated failover is only available with Aurora replicas.
When to use Aurora serverless? (vs Aurora RDS)
Aurora serverless provides a relatively simple, cost-effective option for infrequent, intermittent, or unpredictable workloads
What kind of storage type does DynamoDB use?
SSD storage
How is DynamoDB spread?
Across 3 geographically distinct data centres
What’s the read model for DynamoDB?
Eventually consistent reads by default. Strongly consistent reads are available
What’s the difference between eventually consistent reads and strongly consistent reads?
Eventual consistency across all copies of data is usually reached within a second. Repeating a read after a short time should return the updated data. Best read performance.
A strongly consistent read returns a result that reflects all writes that received a successful response prior to the read.
Does DynamoDB support transactions?
Yes
DynamoDB transactions characteristics
- 3 options for reads: eventual consistency, strong consistency and transactional
- 2 options for writes: standard and transactional
- Up to 25 items or 4MB of data
How can DynamoDB provide ACID capabilities?
Through transactions
How does DynamoDB On-Demand Backup and Restore work?
- Full backups at any time
- Zero impact on table performance or availability
- Consistent within seconds and retained until deleted
- Operates within the same region as the source table
Is DynamoDB Point-in-Time Recovery (PITR) enabled by default?
No
DynamoDB Point-in-Time Recovery (PITR) characteristics
- Protects against accidental writes or deletes
- Restore to any point in the last 35 days
- Incremental backups
- Not enabled by default
- Latest restorable: 5 minutes in the past
DynamoDB Streams characteristics
- Time-ordered sequence of item-level changes in a table
- Stored for 24 hours
- Inserts, updates, and deletes
- Combine with Lambda functions for functionality like stored procedures
DynamoDB Global Tables characteristics
Managed Multi-Master, Multi-Region Replication
- Globally distributed applications
- Based on DynamoDB Streams
- Multi-Region redundancy for disaster recovery or high availability
- No application rewrites
- Replication latency under one second
Can RDS storage scale back down?
No. RDS storage only scales up. It won’t scale back down.