Databases Flashcards
What is ElasticCache?
an in memory cache in the cloud. * Allows you retrieve data a lot quicker, by pulling data from memory cache in the cloud rather than slower disk-based databases. supports master and slave replication.
What are the two types of Elacticcache ?
Memcached Redis (opensource in-memory key-value store)
AWS Database types?
RDS-OLTP DynamoDB (No SQL) RedSHift (Amazon’s OLAP data warehouse product) Elasticache
AWS Database RDS OLTP examples:
SQL MySQL PostgreSQL Oracle Aurora (AWS MySQL & PostgreSQL compatible DB) MariaDB
RDS Backups.
There are two: 1) Automated backups 2) Database snapshots
RDS Backup - Automated backup - key points:
1) Retention 1 - and 35 days. 2) Backup is a fully daily snapshot 3) Stores transactional logs 4) Recovery will first choose the most recent daily backup then apply transaction logs for that day. 5) enabled by default
RDS Backup - database snapshots - key points:
1) Always manual. (User initiated) 2) Are restored even after you delete the original RDS instance. A restored RDS instance will be a new RDS instance with a new DNS endpoint.
Database Encryption:
Encryption at Rest: * MySQL, Oracle, SQ Server, PostgreSQL, MariaDB and Aurora. * Encryption is done using the AWS key management service. * backups, replicas and snapshots are encrypted.
Database and Multi AZ :
Designed for DR recovery. Writes to 1 Database is replicated to database 2. * Failover is automated. * not a performance improvement. Available: SQL Server, Oracle, MySQL, PostgreSQL, MariaDB, Aurora.
Databases and Read Replicas:
This is designed to increase Database performance by reading out, but not for redundancy. you have a read replica of a read replica (some latency) you have 5 read replicas per production database. This is asynchronous. Read replicas can have multi-AZ enabled. Read Replicas can be promoted to their own DB. Must have automatic backups turned on in order to deploy a read-replica. Can enable encryption even if the primary database is not encrypted.
What is DynamoDB ?
It is a fast and flexible NoSQL Database service. It provides: consistent, single digit millisecond latency at scale. Great fit for: mobile, web, gaming, ad-tech, IoT.
DynamoDB Data points:
1) Stored on SSD. 2) Spread across 3 geographically distinct data centres. 3) Eventual consistent reads. (best read performance) 4) Strongly consistent reads. (best write performance)
DynamoDB Pricing ?
Provisioned through capacity. * Write throughput. * read throughput * storage costs.
What is RedShift ?
RedShift is Amazon’s dataware house service in the cloud. (petabyte scale)
Red Shift Costs ?
1) Compute node hours 2) backup 3) data transfer within a VPC.
What is OLAP ?
Online Analytics Processing
Redshift Config :
Single Node or Multi node config. In a multi node setup there is a leader node and compute nodes. (max 128 compute nodes)
RedShift Node Info:
Single Node (160Gb)
RedShift data points:
1) columnar data storage: data is stored in columns not rows. (fewer I/O, improved performance on queries). 2) Adv. compression. 3) Massively parallel processing (MPP) It scales fast and easily))
RedShift Security:
1) Data in transit uses SSL 2) Data at rest uses AES-256 3) RedShift takes care of key management (you can manage your own however)
RedShift Availability:
Only available in 1 AZ. Can restore snapshots to new AZs in the event of an outage.
What is Aurora?
A bespoke database created by AWS. It is compatible with MySQL and PostgreSQL.
Aurora Data Points:
1) 5x better performance than MySQL 2) 1/10th of the cost of MySQL.
Aurora Scaling:
Storage: starts with 10GB, then auto scales at 10GB increments. Compute: scale up to 32vCPUS & 244GB Ram Availability: 2x copies of your data per availability zone, with 3 availability zones. (Can handle the loss of up to 2 copies of data with affecting DB write availability, and can handle the loss of 3 copies of data before affecting DB read availability).
Aurora Replicas:
2 types of replicas are available. it supports up to 15 replicas. it allows for MySQL read replicas (up to 5 replicas) replicas can be multi AZ.
List all Amazon Database Services
- Amazon RDS
- Amazon Aurora
- Amazon RedShift
- Amazon DynamoDB
- Amazon DocomentDB
- Amazon ElastiCache for Memcached
- Amazon ElastiCache for Redis
- AWS DB Migration service
What is RDS ?
Cost-efficient and resizable manages time consuming DBs Fast to deploy isolated DB environment in the cloud Example: MySql, PostgreSQL, MS SQL, MariaDB, Oracle, Amazon Aurora.
What is Amazon DynamoDB ?
Similar to MongoDB / Cassandra NoSQL. No limit on storage fully managed. need to spec the Read and Write throughput.