6.8 Database Summary
AWS Database Types - Summary
RDS - OLTP
SQL
MySQL
Oracle
PostgreSQL
Aurora
MariaDB
DynamoDB - NoSQL
Redshift - OLAP
ElastiCache - In Memory Caching
Memcached
Redis
RDS, Multi-AZ vs. Read Replicas, Cross Region Replication
Multi-AZ is used for HA/DR, but read replica is used for performance improvement.
You can have Cross-Region Replications of your DB instances (e.g. RDS, DynamoDB) as your Disaster Recovery strategy. This functionality complements the synchronous replication (between primary and standby), automatic failure detection, and failover provided with Multi-AZ deployments.
Muti-AZ
Let's say we have some EC2 instances behind ELB, they point to our RDS instance which is in US-EAST-1 using the DNS end point that you get when you create your RDS instance, and then that automatically synchronously replicated across to US-EAST-2. If you got Multi-AZ turned on, when you lose the RDS instance in US-EAST-1, Amazon automatically failover to the RDS instance in US-EAST-2. You don't need to go in and update the DNS endpoint to anything else, that's all done automatically.
Read Replicas
Let's say we have some EC2 instances behind ELB, and they are connecting into our production database. You can then create a read replica of that production database so that if your application is just doing frequent numbers of reads instead of writes, you can re-architect your application. So it will read from your read replicas and write to your main database. You can also have read replicas of read replicas, but you do have to watch out for lag or latency. You can have up to 5 read replicas of your production database at this time.
Aurora Scaling
2 copies of your data is contained in each availability zone, with minimum of 3 availability zones. You got 6 copies of your data. That is the physical storage media, that is not the actual instance running your Aurora database. If you did want multi-AZ for that you need to create Aurora replicas and we have covered it in the lab.
Aurora is designed to transparently handle the loss of up to 2 copies of data without affecting database write availability and up to 3 copies without affecting read availability.
Aurora storage is also self-healing. Data blocks and disks are continuously scanned for errors and repaired automatically.
Aurora Replicas
2 types of Replicas are available
Aurora replicas (currently up to 15)
MySQL read replicas (currently up to 5)
DynamoDB vs. RDS
DynamoDB offers "push button" scaling, meaning that you can scale your database on the fly, without any down time.
RDS is not so easy and you usually have to use a bigger instance size or to add a read replica. It is similar to Aurora. If you are going to scale up or scale out using RDS, you will have some downtime, so you need to do this during a maintenance window.
DynamoDB
Stored on SSD storage
Spread across 3 geographically distinct data centers.
Eventually consistent reads (default)
Strongly consistent reads
Difference between Eventually and Strongly consistent reads: after you write to a DynamoDB, if you need that information presented back to your application under 1 second, you need strongly consistent read, otherwise you just need eventually consistent read.
Redshift Configuration
Redshift is the data warehousing solution of AWS. Two kinds of configurations.
Single Node (Up to 160 GB storage). It is used for small to medium businesses.
Multi-Node
Leader Node (manage client connections and receives queries).
Compute Node (store data and perform queries and computations). Up to 128 compute nodes underneath a leader node.
ElastiCache
Remember the two open-source in-memory caching engines.
Memcached
Redis
Eaxm Tips
Read the FAQ of RDS, because RDS is primarily what you are going to see come up in the exam the most.
Last updated
Was this helpful?