RDS, Aurora & ElastiCache Flashcards
What is Amazon RDS?
- It’s a managed DB service for DB use SQL as a query language.
What are the supported RDS engines?
- Postgres
- MySQL
- MariaDB
- Oracle
- Microsoft SQL Server
- Aurora (AWS Proprietary database)
What are the advantages to RDS vs EC2 with db?
- Automated provisioning, OS patching
- Continuous backups and restore to specific timestamp (Point in Time Restore)!
- Monitoring dashboards
- Read replicas for improved read performance
- Multi AZ setup for DR (Disaster Recovery)
- Maintenance windows for upgrades
- Scaling capability (vertical and horizontal)
- Storage backed by EBS (gp2 or io1)
BUT you can’t SSH into your instances
What is RDS - Storage Auto Scaling?
- Helps you increase storage on your RDS DB instance
dynamically - When RDS detects you are running out of free database
storage, it scales automatically - Avoid manually scaling your database storage
- You have to set Maximum Storage Threshold (maximum limit for DB storage)
Why is auto scaling used?
Useful for applications with unpredictable workloads * Supports all RDS database engines (MariaDB, MySQL,
PostgreSQL, SQL Server, Oracle)
What are RDS Read Replicas?
Async replications of the main db. Reads are eventually consistent.
What are the main features of Read Replicas?
- Up to 15 Read replicas
- Within AZ, Cross AZ or Cross Region
- Can be promoted to main DB
- App must handle connection string change to read from them
Whats the uses cases of Read Replicas?
Prod application writes to main db. Reporting application reads the data from the replica.
What are the network costs for read replicas?
They are free within a region but cross region you have to pay for it.
What is RDS Multi AZ (Disaster Recovery)?
Sync replication of the main db. Its a standby in case of failover.
* One DNS name – automatic app
failover to standby
* Increase availability
* Failover in case of loss of AZ, loss of network, instance or storage failure
* No manual intervention in apps
* Not used for scaling
* Note:The Read Replicas be setup as
Multi AZ for Disaster Recovery (DR)
Can you move Single AZ RDS to Multi-AZ?
Yes you can. It has zero downtime. Click on “modify” and change it.
What is Amazon Aurora?
Aurora is “AWS cloud optimized” and claims 5x performance improvement
over MySQL on RDS, over 3x the performance of Postgres on RDS.
What are the main advantages of Aurora?
- Aurora storage automatically grows in increments of 10GB, up to 128 TB.
- Aurora can have 15 replicas while MySQL has 5, and the replication process
is faster (sub 10 ms replica lag) - Failover in Aurora is instantaneous. It’s HA (High Availability) native.
- Aurora costs more than RDS (20% more) – but is more efficient
What is Aurora High Availability and Read Scaling?
- 6 copies of your data across 3 AZ:
- 4 copies out of 6 needed for writes
- 3 copies out of 6 need for reads
- Self healing with peer-to-peer replication
- Storage is striped across 100s of volumes
- One Aurora Instance takes writes (master)
- Automated failover for master in less than 30 seconds
- Master + up to 15 Aurora Read Replicas serve reads
- Support for Cross Region Replication
What are the 2 endpoints of an Aurora DB Cluster?
- Writer endpoint => pointing to Master db
- Reader endpoint => Connection to Load Balancing
What are the 2 db engines supported by aurora?
MySql, Postgre
What are the features of Aurora?
Automatic fail-over
* Backup and Recovery
* Isolation and security
* Industry compliance
* Push-button scaling
* Automated Patching with Zero Downtime
* Advanced Monitoring
* Routine Maintenance
* Backtrack: restore data at any point of time without using backup
What are the features of Aurora?
- Automatic fail-over
- Backup and Recovery
- Isolation and security
- Industry compliance
- Push-button scaling
- Automated Patching with Zero Downtime
- Advanced Monitoring
- Routine Maintenance
- Backtrack: restore data at any point of time without using backup
What are the security options for RDS?
- Encryption, to encrypt/unencrypt db create DB snapshot & restore as encrypted
- In-flight encryption: TLS ready by default, AWS TLS
- IAM Auth: IAM roles to connect to your db
- Security Groups: Control Network access to your RDS
- No SSH
- Audit Logs can be sent to CW for longer retention
What is Amazon RDS proxy?
- Fully managed database proxy for RDS
- Allows apps to pool and share DB connections established with the database
What the usage of RDS Proxy?
- Improving database efficiency by reducing the stress
on database resources (e.g., CPU, RAM) and
minimize open connections (and timeouts) - Serverless, autoscaling, highly available (multi-AZ)
- Reduced RDS & Aurora failover time by up 66%
- No code changes required for most apps
- Enforce IAM Authentication for DB, and securely store credentials in AWS Secrets Manager
- RDS Proxy is never publicly accessible (must be
accessed from VPC)
You have a MySQL RDS database instance on which you want to enforce SSL connections. What should you do?
Execute a <code>REQUIRE SSL</code> SQL statement to all your DB users
What is Elastic Cache?
ElastiCache is to get managed Redis or Memcached.
Caches are in-memory databases with really high performance, low
latency.
* Using ElastiCache involves heavy application code changes
What is one of the main Elastic Cache usage?
User Session Store.