Databases on AWS Flashcards
Databases RDS
Relational Databases (RDS)
- Multi-az - for desaster recovery - From an EC2, if primary DB goes down it flips over to a secondary DB in new AZ
- Read Replicas - Whenever write happens in the primary DB it copies over to a read replica which you’d then have to link up with your EC2 separately
Types
- MySQL
- Oracle
- SQL Server
- Auroa
- MariaDB
Non relational Databases
- Can change/add a key:value pair to an object without adding them to all objects
Test tips
- RDS runs on virtual machines
- RDS is not serverless - Aurora is
- Cannot log into these OSs
- Patching RDS OSs and DBs is amazons responsiblity
Backups, multi-AZ, read replicas
Backups
- Automated backups are stored in S3
- SNAPSHOTS are done manually
- Whenever your restore a backup or snapshot it will have a new RDS
Multi-AZ
- Allows for an exact copy of your database in another AZ
- For disaster recovery only
- Can force a failover
Read Replica
- Allows for a read only copy of your database
- Async/Multi-AZ
- Used for scaling
- Up to 5 copies
- Will have it’s own DNS endpoint
- Can be promoted to it’s own database
DynamoDB
DynamoDB
- NoSQL database service
Basic info
- Stored on SSD Storage
- spread across 3 geographically distinct data centers
- Eventual Consistant Reads (default)
- Consistancy across all copies of data around 1 sec
- Strongly Consistant Reads
- Less then 1 sec
Redshift
Redshift - Petabyte scale data warehouse servuce in the cloud - used for business - one AZ currently
- Singel node (160gb)
- Always tries to maintain 3 copies of your data
- Multi-node
- Leader node (manages client connections and receives queries)
- Compute Node (store data preforms queries and computations)
- Up to 128 compute nodes
- Highly advanced compression
- Massive parallel processing(MPP)
- Using nodes
- Backups enabled by default - 1 day
- retention period 35 days
- Can Async replicate to S3
- Priced by compute node hours
- Backups as well
Aurora
Amazon’s Aurora - MySQL and PostgreSQL-compatible relational database.
- 5 times better performance then MySQL, 3 times better than PostgreSQL at a much lower price point
- Serverless - On-demand for infrequent/intermittent or unpredictable workloads
Basics
- Starts at 10GB scales to 64GB
- Compute resources 32vCPU and 244GB of Memory
- 2 copies of your data in each AZ - min of 3 AZ == 6 copies
- You can share aurora snapshots with other AWS accounts
- 3 types of replicas avaliable
- Aurora replicas(automated failover), MySQL, PostgreSQL
- Backups on by default
Elasticache
Elasticache - web service that makes is easy to deploy, operate and scale an in-memory cache in the cloud. Stores things in a cache to make things load faster.
- Memcached
- Simple
- Redis(Better)
- Multi-AZ
- Backups
Database Migration Service (DMS)
Database Migration Service (DMS) - use to migrate databases on or off the cloud
- Hermogenous conversion - same DB engine type conversion
- Hertrogenous - one databases converts to a different type of database engine using Schema Conversion Tool (SCT)
Caching Services
Caching Services
- CloudFront - media
- API Gateway
- ElastiCache - memcached and Redis
- DynamoDB accelorator
EMR
EMR - Big data PROCESSING broken down into clusters
- Can confgiure clusters to periodically archive the log files stored in the master node in S3 five min intervals
EMR Cluster Node Types
- Master node - manages the cluser - status of tasks - log data stored here
- Core Node - software components - run tasks and stores data
- Task Node(optional) - does not store data - only runs tasks