RDS, Aurora & Elasticache Flashcards
What are the 6 databases that RDS supports?
- Postgres
- MySQL
- MariaDB
- Oracle
- Microsoft SQL Server
- Aurora
How many read replicas can you have?
Up to 5
Are all read replicas in the same AZ?
You can have them in the same AZ, cross AZ or cross region
What does async replication mean?
It means the reads are eventually consistent
How does an application leverage read replicas?
You need to update the connection string
What is a typical use case for read replicas?
When you need a reporting application to read data but don’t want the production application to be impacted
What SQL keyword can be used with read replicas?
SELECT only. Not UPDATE, INSERT or DELETE
Do you have to pay for cross AZ traffic in read replicas?
If you are within the same region, the cross AZ traffic is free
What is RDS Multi AZ for?
It is for Disaster Recovery
In Multi AZ, how does the application switch from the main DB to the backup DB?
The application connects using a DNS name, which will automatically point to the backup if the master goes down.
Can read replicas be setup as Multi AZ for Disaster Recovery?
Yes
How do I make my DB go from single AZ to multi AZ?
Just click on Modify in the database and enable multi AZ. It causes zero downtime
What happens when I click enable multi AZ?
- A snapshot of the DB is taken.
- A new DB is restored from the snapshot in a new AZ
- Synchronization is established between the 2 DBs
Can I encrypt a read replica?
Only if the master is encrypted
How do you enforce SSL in Postgres?
In the RDS console, in Parameter Groups, set:
rds.force_ssl=1
How do you enforce SSL in MySQL?
Within the DB, run the following:
GRANT USAGE ON . TO ‘mysqluser’@’%’ REQUIRE SSL;
What are the 4 steps to encrypt an unencrypted DB?
- Create a snapshot
- Copy the snapshot and enable encryption
- Restore the DB using the encrypted snapshot
- Migrate apps to the new DB and delete the old one
What are the 4 things I am responsible for with RDS security?
- Check ports/IP/inbound security group rules
- In-DB user creation and permissions or manage through IAM
- Create a DB with or without public access
- Ensure parameter groups or DB is configured to allow SSL
What is AWS responsible for with RDS security?
- No SSH access
- No manual DB patching
- No manual OS patching
- No way to audit the underlying instance
What are the 2 DBs supported by Aurora?
- Postgres
- MySQL
How does Aurora maintain high availability and read scaling?
It has 6 copies of your data across 3 AZs
What are the 6 copies used for?
- 4 copies out of 6 needed for writes
- 3 copies of of 6 needed for reads
Does Aurora support cross region replication?
yes
What is a Writer endpoint in Aurora?
It is the DNS name the clients points to to communicate with the master
What is the Reader endpoint in Aurora?
It is the DNS name clients communicate with to read from the DB. This supports Load Balancing to all read replcias
What is a custom endpoint in Aurora?
It is a new endpoint you can point at specific Read Replicas to do analytic queries for example
What happens when you create a custom endpoint in Aurora?
The Reader Endpoint is no longer used and you need to create custom endpoints to point at specific read replicas
What is Aurora Multi Master?
It is when Aurora Serverless allows every node to read/write
What is Elasticache?
It allows you to get managed Redis or Memcached
What are the 4 features of Redis?
- Multi AZ failover
- Read Replicas to scale
- Data Durability
- Backup and restore features
What are 5 things to note about Memcached?
- Multi node for data partitioning
- No High Availability
- Non persistent
- No backup and restore
- Multi threaded
Does Elasticache support IAM authentication?
no
What are the 2 security options for Redis?
- Set a pwd/token when creating a cluster
- Supports SSL for in flight encryption
What auth method does Memcached support?
SASL based auth
What are the 3 patterns for Elasticache?
- Lazy Loading
- Write Through
- Session State
What is Redis Sorted Sets?
It gaurantees uniqueness and element ordering, so its good for game leader boards etc
What is the Postgres port?
5432
What is the MySql port
3306
What is the Oracle RDS port?
1521
What is the MSSQL Server port?
1433
What is the MairiaDB port?
3306 - same as MySQL
What is the Aurora port?
5432 if Postgres
3306 if MySQL