RDS + AURORA + ELASTICACHE Flashcards
What is RDS?
Relational Database Service. It works with SQL as query language
What kind of SQL databases does RDS support?
Posgres
My SQL
Aurora (AWS)
Microsoft SQL Server
MariaDB
Oracle
IBM DB2
What is Aurora
AWS’s SQL Relational Database
What are some benefits of running SQL on RDS rather than EC2 instances?
The database provisioning is automated
Automatic OS patching
continuous backups being made, which you can restore to a specific timestamp
Monitoring dashboards, to view the database’s performance
Read replicas to improve read performance
Easily setup multi-az for DR: disaster recovery
Automatic maintenance windows for minor db pgrades
You can easily scale horizontally and vertically.
Storage is backed by EBS
What is a disadvantage of running your SQL in RDS?
you can’t ssh to your RDS instances
What is storage auto scaling?
It’s for RDS. It scales automatically when it detects your database is about to run out of storage.
How does storage auto scaling work?
You set a maximum storage threshold.
It auto increases storage if:
free space less than 10%
this low storage lasts more than 5 minutes
Where can you scale your read replicas to?
Within same AZ, cross AZ, and cross Region.
How many read replicas can we create?
Up to 15
What is eventually consistent ASYNC replication? and how does it apply to RDS read replicas?
Its how the replication process works for read replicas. It means the replicas have a delay in getting the data replicated from the original Database instance. So when you read from a replica you may get old information.
What is a read replica promotion?
Read replicas can be promoted to their own database. They are out of the replication system after that. They become a separate database.
What is a connection string in SQL?
Its what tells the application where the database is, for example:
Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
How do you connect the read replicas to the app that uses the database?
By adding connection strings in the app
What are use cases for read replicas?
When you have a production app that uses a database, and you need to add for example a reporting tool that needs to read the database.
This can slow down the production app. So what you can do instead is use a read replica for the reporting tool to read, and you dont affect the production app and the main database instance.
What are SELECT, INSERT, UPDATE, DELETE in SQL?
Types of statements you use in an app to interact with a database.
What is important in read replicas is to only interact with it with SELECT statements, which equal to read statements.
SELECT = read
insert means add, update means modify, and delete is remove. These make changes to the database, but with read replicas we only want to read them, since the changes come replicated from the original database.
What SQL statements should be used to interact with RDS read replicas?
only SELECT, which equals to read.
In AWS normally there is a cost when data goes from where to where?
From an AZ to another AZ.
From a region to another region
Or from aws to outside of aws
Does RDS read replicas have any cost for the data replicated between AZs?
No. RDS is an exception and its free. (Only within same region)
Does RDS read replicas have any cost for the data replicated between Regions?
YES.
What RDS feature is for disaster recovery?
RDS Multi-AZ
What RDS feature is for read scalability?
Read Replicas
What RDS feature is for automated storage scalability?
Storage auto scaling
How does RDS Multi-AZ work?
It creates a live or “SYNC” replica of your database in a different AZ.
This replica is in standby, and in case of AZ, network, storage, or any failure of main DB, it automatically failovers to the standby replica, which now becomes the master.
Which RDS feature uses a SYNC replica?
RDS Multi-AZ