6. Databases Flashcards
What is RDS and its 6 engines?
Relational Database Service. Incorporates SQL Server, ORACLE, MySQL, PostgreSQL, MariaDB and Amazon Aurora
What is and is not RDS good for?
Good for Online Transaction Processing, e.g. payments
Not good for Online Analytical Processing (OLTS) -> use Redshift instead
- What would you use for RDS disaster recovery?
- Does it apply to all engines?
- How does it work?
- Multi-AZ. Multi-AZs are created by default.
- All except Amazon Aurora, which does not need it because it is distributed by definition.
- The primary is automatically replicated to Standby. The DB connection string is a URL address. Because Amazon handles DNS failover automatically, it will detect the downtime and automatically switch to the replica.
- What would you use for RDS High Availability?
- How does it work?
- What do you also have to do to use it?
- Amazon RDS Read Replicas
- Up to 5 replicas can be created from the AWS console. Can be across different Regions and AZs
- Enable automatic backups
- What is Amazon Aurora?
- What are its important qualities?
- Amazon-proprietory RELATIONAL database, compatible with MySQL and PostgreSQL
- a mix of high performance, scalability and availability
- 6 copies of data: minimum 3 AZs, 2 copies each
- Starts with 10GB, automatically scaled in 10GB increments up to 128TB
What are Amazon Aurora’s Replica types?
- Aurora Replica: up to 15 read replicas ALSO: automated failover, self-healing (2 write/3 read)
- MySQL Replica: up to 5 read replicas, slower replication time, cross-Region, manual failover. ALSO: supports user-defined replication delay and different data schemas between primary and secondary
- PostgreSQL Replica: up to 5 read replicas
What about Amazon Aurora’s backups and snapshots
Backups are automated, and always enabled; snapshots can be shared with other AWS accounts.
What would you do if you needed Aurora, but you have intermittent, infrequent or unpredictable workloads?
Use Amazon Aurora Serverless - on-demand, auto-scaling configuration. DB cluster automatically starts up, shuts down and scales.
What are the main qualities of DynamoDB?
- NoSQL database; supports Document and Key-Value models
- Stored on SSD, spreads across 3 geographically distinct data centres
- Can be eventually consistent (~1sec) OR strongly consistent
When would you use
1. Aurora?
2. DynamoDB?
3. DAX?
- You need a relational database compatible with MySQL or PostgreSQL
- You need documents on the KV database for mobile, web, gaming, IoT
- Improve the read performance of DynamoDB
When would you use
1. Aurora?
2. DynamoDB?
- You need a relational database compatible with MySQL or PostgreSQL
- You need document on KV database for mobile, web, gaming, IoT
What is DAX?
- DynamoDB Accelerator. Fully managed highly available in-mem cache.
10x performance improvements - request time in microseconds
Application only needs to connect to DAX
Pay-per-request pricing; BUT you pay more than with the provisioned capacity
- What is DAX?
- What are its qualities?
- DynamoDB Accelerator. Fully managed highly available in-mem cache.
10x performance improvements - request time in microseconds
Application only needs to connect to DAX - Pay-per request pricing; BUT you pay more than with the provisioned capacity
- How do you deliver ACID in DynamoDB?
- Why would you need it?
- Use DynamoDB Transactions
- Financial transactions; fulfilling orders; multiplayer game engines; distributed processes;
What are DynamoDB Transactions options?
Read: Eventual Consistency, Strong Consistency and Transactional
Write: Standard and Transactional