RDS + Aurora + Elasticache Flashcards

1
Q

What are RDS databases that are managed by AWS?

A
  1. Postgres
  2. MySQL
  3. MariaDB
  4. Oracle
  5. Microsoft SQL server
  6. IBM DB2
  7. Aurora
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the advantages to using RDS insteading of deploying database on EC2?

A

RDS is a managed service so you get things like:
- Automate provisioning, OS patching
- Continuous backups and restore to a specific timestamp
- Monitoring dashboards
- Read replicas for improved read performance
Etc but you can’t SSH into your instances

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

___________ helps you increase storage on your RDS DB instance dynamically

A

RDS- Storage scaling

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are some features of RDS storage auto scaling?

A
  • When RDS detects you are running out of free database storage, it scales automatically
  • Avoid manually scaling your database storage
  • Your have to set maximum storage threshold (max limit for DB storage)
  • Automatically modify storage if:
    1. Free storage is less than 10% of allocates storage
    2. Low storage last at 5 minutes
    3. 6 hours have passes since last modifications
  • Useful for application with unpredictable workloads
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

_________ help you scale your reads

A

Read replicas

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the features of Read replicas?

A
  • Can have up to 15 read replicas
  • can occur Within AZ, cross AZ, or cross region
  • Replication is ASYNC, so reads are eventually consistent
  • Replicas can be promoted to their own DB
  • Applications must update the connection string to leverage read replicas
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are some use case for read replicas?

A
  • When you have a production database thag is taking on normal load
  • When you want to run a reporting application to run some analytics
  • When you create a read replica to run the new workload
  • The production application is unaffected
  • Read replicas are used for select (read) only kind of statement (not insert, update, delete)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

In AWS there’s a network cost when data goes from ___________

A

One region to another

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Since RDS is a manged service don’t have to pay when using the RDS Read replicas with the ____________ but do have to pay when using cross regions

A

Same region /different AZ

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Describe the RDS multi AZ (disaster recovery)

A
  1. Your application does read and writes to RDS master DB instance in one AZ and what it does is have SYNC replication to a standby instance in another AZ
  2. So one DNS name which results in an automatic app failover to standby
  • Which increase the availability
  • You can setup your read replicas as multi AZ if you wanted to
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do you make an RDS go from a single AZ to multi AZ?

A
  • It’s a zero downtime operation (no need to stop the DB)
  • Just click on “modify” for the database & enable multi AZ (which means your RDS DB instance is going to have a master and have a standby DB with SYNC replication)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

___________ manage oracle and Microsoft SQL server database with OS and database customization

A

RDS Custom

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are some features of RDS custom?

A
  • Access to the underlying database & OS
  • Configure settings
  • Install patches
  • Enable narice features
  • Access the underlying EC2 instance using SSH or SSM session manager
  • De-activate Automation mode to perform your customizations better to take a DB snapshot before
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

__________ is a proprietary technology from AWS & postgres and mySQL are both supported as Aurora DB & it’s “AWS cloud optimizes” & claims 5x performance improvement over MySQL on RDS. It’s storage automatically grows in increments of 10GB up to 128 TB. It can also have up to 15 replicas and the process is faster than MySQL

A

Aurora

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are some features of aurora availability and read scaling?

A
  • Will store 6 copies of your data across 3 AZ & has self healing with peer to peer replication & storage is striped across 100s of volumes
  • One Aurora instance takes writes (master)
  • Automated failover fir master in less than 30 seconds
  • Master + up to 15 Aurora read replicas serve reads ( & supports cross region replication)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

________ points to the master (in context to aurora DB cluster)

A

Writer endpoint

17
Q

_______ connects to the load balancing & connects automatically with the replicas (in context to aurora DB cluster)

A

Reader endpoint

18
Q

What the features of Aurora ?

A
  • Automatic failover
  • Backup and recovery
  • Isolation and security
  • Industry compliance
  • Push- button scaljng
  • Automated patching with zero downtime

Etc

19
Q

Explain aurora replicas auto scaling

A
  1. Let’s say you a client and 3 aurora instances where one is writing through the writing endpoint and the other two are reading through reader endpoint
  2. If you have many request on reader endpoints it’ll increase the CPU usage which you can setup replica auto scaling which will add aurora replicas and extend the reader endpoints are extended to cover the new replicas and the new replicas will start receiving traffic and request are distributed evenly
20
Q

With __________ you define a subset of aurora instances as a custom endpoint & the reader endpoint is generally not used after defining custom endpoints

A

Aurora custom endpoints

21
Q

What are some features of Aurora serverless?

A
  • Automated database instantiation and auto-scaling based on actual usage
  • Good for infrequent, intermittent or unpredictable workloads
  • No capacity planning needed
  • Pay per second, can be more cost efficitive
22
Q

What are some features of Global Aurora?

A
  1. Aurora cross region read replicas
    - Useful for disaster recovery
    - Simple to put in place
  2. Aurora global database (recommend)
    - 1 primary region (read/write)
    - Up to 5 secondary (read-only) regions, replication lag is less than 1 second
    - Up to 16 read replicas per secondary region
    - Helps for decreasing latency
    - Typical cross replication takes less than 1 second (big indicator that it’s talking about global aurora)
23
Q

What are some features of Aurora machine learning?

A
  • Enables you to add ML- based predictions to your applications via SQL
  • Simple, optimized, and secure integration between Aurora and AWS ML services
  • Supported services (Amazon sagemaker and aws comprehend)
  • Use cases is fraud detection, ads targeting, sentiment analysis, product recommendations
24
Q

What are some features of RDS backups?

A
  1. Has automated backups
    - Daily full backup of the database (during the backup window)
  • 1 to 35 days of retention, set 0 to disable automated backups
  1. Manual DB snapshots
    - Manually triggered by the user
    - Retention of backup for as long as you want
  • Trick with RDS backups, in a stopped RDS database, you will still pay for storage. If you plan on stopping it for a long time, you should snapshot & restore instead
25
Q

What are some features of aurora backups?

A
  1. Has automate backups
    - 1 to 35 days (can’t be disabled)
    - point in time recovery in that timeframe
  2. Manual DB snapshots
    - manually triggered by the user
    - retention of backup for a long as you want
26
Q

What are some features of RDS & Aurora Restore options?

A
  1. Restoring a RDS/ Aurora backup or a snapshot creates a new database
  2. Restoring MySQL RDS database from S3
    - Create a backup of your on-promise database
    -Store it on Amazon S3(object storage)
    - Restore the backup file onto a new RDS instance running MySQL
  3. Restoring MySQL Aurora cluster from S3
    - Create a backup of your on premises database using percona XtraBackup
    - Store the backup file on Amazon S3
    - Restore the backup file onto a new Aurora cluster running MySQL
27
Q

What are some features of Aurora Database Cloning?

A
  1. Create a new Aurora DB cluster from an existing one
  2. Faster than snapshot & restore because it uses copy-on-write protocol
    - Initially the new DB cluster uses the same data volume as the original SB cluster (fast & efficient no copying is needed)
  3. Very fast & cost-effective
  4. Useful to create a “staging” database from a”production” database without impacting the production database
28
Q

What are some features of RDS & Aurora Security?

A
  • At Rest encryption: database master & replicas encryption using AWS KMS - must be defined as launch time
  • In flight encryption: TLS ready by default use the AWS TLS Root certificate client side

-IAM authentication: IAM roles to connect to your database (instead of username/pw)

-Security groups: Control Network Access to your RDS/Aurora DB

  • No SSH available except on RDS custom
  • Audit logs can be enabled & sent to cloudwatch logs for longer retention
29
Q

What are some features if Amazon RDS proxy?

A
  • Allows apps to pool & share DB connections established with the database
  • Improving database efficiency by reducing the stress on database resources (like CPU, RAM, etc) and minimize open connections (& timeouts)
  • Reduced RDS & Aurora failover time by up to 66%
  • Enforce IAM authentication for DB, & securely store credentials in AWS secrets manager (good indicator that it’s RDS proxy)
  • RDS Proxy is Never publicly accessible (must be accessed from VPC)
30
Q

What are some features with Amazon ElastiCache Overview?

A
  • Elasticache is to get managed Redis or memcached
  • Caches are in - memory database with really high performance, low latency
  • Helps reduce load off data se for reward intensive workloads
  • AWS takes care of IS maintenance/ patching, optimization, setup, configuration, monitoring, failure recovery & backups
  • Using elasticache involves heavy application code changes
31
Q

Describe the elasticache solution architecture? (Lazy loading pattern)

A
  1. Let’s say you have an application, Amazon elasticache and RDS, the application will query the elasticache to see if the query has been already made & if it has then it’s called a cache hit & gets all information from the elasticache
  2. If it’s a cache miss (no query been made) then it the application goes to the Amazon RDS & read from DB and then for other applications or instance where the same query will be made then you can write to cache to the elasticache so the next time it will result in a chance hit
32
Q

What is the difference between Redis & Memcached?

A

Redis:
- Multi AZ with Auto failover
- Read replicas to scale read and have high availability
- Data durability using AOF
- Backup and restore features (main difference)
- Supports sets and stored sets

Memcached:
- Multi- Mode for partitioning of data (sharding)
- No high availability (replication)
- non persistent
- No backup and restore
- Multi- threaded architecture

33
Q

What are some features of Elasticache- cache security?

A
  • Elasticache Supports IAM authentication for Redis
  • IAM policies on elasticache are only used for AWS API- level security
  • Redis AUTH:
    1. Can set password/token when you create a Redis cluster
  1. Support SSL in flight encryption
  • Memcached:
    1. Supports SASL - based authentication (advanced)
34
Q

What are the different patterns for elasticache?

A
  1. Lazy loading: all the read data is cached data can become stale in cache ( think of the elasticache solution example)
  2. Write through: adds or update data on the cache when written to a DB (no stale data)
  3. Session store: store temporary session data in a cache (using TTL features)
35
Q

What is the use case for elasticache- Redis?

A
  • Gaming leaderboard
  • Can use Redis sorted sets guarantee both uniqueness and element ordering