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.