Section 8: AWS Fundamentals: RDS + Aurora + ElastiCache Flashcards

1
Q

```

What does AWS RDS stand for, and what is it?

A

Amazon Web Services Relational Database Service. It’s a managed DB service for databases that use SQL as their query language.

Subsection: Amazon RDS Overview

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

Are RDS database managed by AWS?

A

Yes

Subsection: Amazon RDS Overview

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

Which types of databases can you use with an AWS RDS? (there are 6)

A
  • PostgreSQL
  • MySQL
  • MariaDB
  • Oracle
  • Microsoft SQL Server
  • Aurora (AWS Propriety database that will be discussed more in another section)

Subsection: Amazon RDS Overview

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

Relational Database Service is AWS managed. This means that when you use RDS, you get a lot of built in benefits that can make using RDS preferable to deploying a database on an EC2 instance. Which of the following, if any, is/are NOT one of the built in AWS managed benefits you get from using RDS? If any are false, what is the/are their true version(s)?
* A) Automated provisioning, OS patching
* B) Continuous backups and resore to specific timestamp (Point in Time Restore)
* C) Monitoring dashboards
* D) Read/write replicas for improved performance
* E) Multi AZ setup for Disaster Recovery
* F) Maintenance windows for upgrades
* G) Scaling capability (vertical and horizontal)
* H) Storage backed by EBS (gp2 or ioI)
* I) Ability to SSH into your instances

A

D) is false. RDS gives you read replicas for improved read performance. There is currently no such things as a write replica.

I) is false. You CANNOT ssh into the EC2 instances underlying your RDS.

Subsection: Amazon RDS Overview

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

What helps you increase storage on your Relational Database Service database dynamically by detecting when you are running out of free database storage and scaling automatically?

Did mention this might come up in the exam.

A

RDS - Storage Auto Scaling

Subsection: Amazon RDS Overview

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

Which of the following, if any, is/are untrue of Relational Database Service - Storage Auto Scaling? If any are false, what is the/are their true version(s)?
* A) You have to set a max storage threshold (max limit for db storage)
* B) Automatically modify storage if: Free storage is less than 10% of allocated storage; Low-storage lasts for at least 5 minutes; 6 hours have passed since last modification
* C) Not useful for application with unpredictable workloads
* D) Supports all RDS database engines (PostgreSQL, MySQL, MariaDB, Oracle, Microsoft SQL Server)

A

C) is false. RDS Storage Auto Scaling is useful for apps with unpredictable workloads.

Perhaps this one is exam relevant?

Subsection: Amazon RDS Overview

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

RDS read replicas vs multi AZ
Which is a use case for an RDS read replica, and which is a use case for multi AZ?

extremely important for exam!

A

Subsection: Amazon RDS Overview

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

Do Relational Database Systems help you to scale your reads?

extremely important for exam!

A

Yes

Subsection: Amazon RDS Overview.

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

Which of the following, if any, is/are untrue about Relational Database Read Replicas? If any are false, what is the/are their true version(s)?
* A) Up to 10 Read Replicas
* B) Within AZ, Cross AZ or Cross Region
* C) replicas are asynchronous
* D) Replicas can become their own database (you can write to them too, if they become their own database)
* E) Applications must update the connection string to leverage read replicas.
* F) Reads and Writes are performed only on the main RDS DB instance

A

A) is untrue. You can have up to fifteen read replicas

Subsection: RDS Read Replicas vs Multi AZ. extremely important for exam!

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

Read replicas are asychronous. This means that changes to your main database eventually get copied over to your Read Replicas. This also means that it’s possible that your application will try to read from a read replica and get stale data (data that is no longer matching the up-to-date data that is in your main RDS). So, would using RDS Read Replicas be good choice if your app needed to use real time data?

A

I wouldn’t think so. Or, I’d at least want to check how far behind the read replicas are from the main RDS, but mostly, I don’t think RDS Read Replicas would be a good fit for an application that needed real time data.

Subsection: RDS Read Replicas vs Multi AZ. extremely important for exam!

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

Would the following be a good use case for a Relational Database Service Read Replica? If so, could you describe the flow?

You have a production application and you want to create a reporting application/run some analytics.

A

Yes. Your production application reads/writes to your RDS DB instance. Then through asynchronous replication, that data gets copied over to your RDS DB instance read replica. Then your reporting application doesn’t need to bother you rmain RDS DB instance at all, it can get everything it needs by reading from the RDS DB instance read replica.

Subsection: RDS Read Replicas vs Multi AZ. extremely important for exam!

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

True/False:
If your RDS Read Replica is within the same region (ex, us-east), you don’t have to pay for transferring data from one AZ to another (ex, us-east-1a to us-east-1b).

A

True.

Subsection: RDS Read Replicas vs Multi AZ. extremely important for exam!

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

True/False:
You incur a cost if you attempt to use a cross-region read replica. That is, you incur a cost if your RDS Read Replica is not within the same region as your RDS DB instance (ex, us-east-1a to eu-west-1b).

A

True

Subsection: RDS Read Replicas vs Multi AZ. extremely important for exam!

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

Regarding RDS Multi AZ (Disaster Recovery) (also called an RDS DB instance standby)
Which of the following, if any, is/are false? If any are false, what is the/are their true version(s)?

  • A) Sync replication
  • B) One DNS name - automatic app failover to standby
  • C) increased availability
  • D) Failover in case of loss of AZ, loss of network, instance or storage failure
  • E) No intervention needed in aps
  • F) Used for scaling
A

F) is false. RDS Multi AZ (Disaster Recovery) is not, by itself used for scaling. However, you can set up Read Replicas as Multi AZ for Disaster Recovery, so that if your main RDS DB instance goes down, one of your Read Replicas will become your main RDS DB instance (and you’ll be able to write to it).

Also, when we say “one DNS name”, we mean that your DNS name first goes to your main RDS DB, and that if for some reason your main RDS DB is unavailable, the same DNS name will eventually take your application to your RDS DB standby instance.

Subsection: RDS Read Replicas vs Multi AZ. extremely important for exam!

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

True/False. Bonus points for guessing any parts of the additional notes.
You can set up a Read Replica as Multi AZ for Disaster Recovery

A

True. if your main RDS DB instance goes down, one of your Read Replicas will become your main RDS DB instance (and you’ll be able to write to it) your one DNS name will route to your new main RDS DB instance instead of routing to the broken one.

Subsection: RDS Read Replicas vs Multi AZ. extremely important for exam!

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

As an answer to the question of “How do we make an RDS database go from single AZ to Multi AZ?” (a process which, btw, has zero downtime), are the following steps in the correct order:
* A) Click on ‘modify’ for the database.
* B) Then a snapshot will be taken of your main RDS DB instance.
* C) Then a new DB is restored (created) from your snapshot in a new AZ. This is your new “standby DB”
* D) Then synchronization is established betwen the two databases (I beleive the idea is that now what’s in your standby db will continually be brought to match what’s in your main RDS DB.

A

Yes

Subsection: RDS Read Replicas vs Multi AZ. extremely important for exam!

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

Which of the following, if any, is/are false? If any are false, what is the/are their true version(s)?

  • A) Aurora is AWS propriety tech, cloud optimized and claims 5x performance of MySQL on RDS, and 3x the performance of Postgres on RDS.
  • B) Aurora storage starts at 10GB and grows automatically as needed up to 128 TB.
  • C) Aurora can have up to 15 replicas and the replication process is faster than MySQL (sub 10 ms replica lab)
  • D) Failover in Aurora is instantaneous, it’s high availability (HA) native
  • E) Aurora costs no more than the other RDS database types
A
  • E) is false. Aurora costs more than RDS (20% more (I assume me means that of the RDS options, Aurora costs of the most)) - but it’s more efficient.

Subsection: Amazon Aurora (“don’t need deep knowledge, but you need enough high level overview to understand how it works” -_- )

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

Which of the following, if any, is/are false? If any are false, what is the/are their true version(s)?

  • A) Aurora is AWS propriety tech, cloud optimized and claims 5x performance of MySQL on RDS, and 3x the performance of Postgres on RDS.
  • B) Aurora storage starts at 10GB and grows automatically as needed up to 64 TB.
  • C) Aurora can have up to 15 replicas and the replication process is faster than MySQL (sub 10 ms replica lab)
  • D) Failover in Aurora is configurable
  • E) Aurora costs more than RDS (20% more (I assume me means that of the RDS options, Aurora costs of the most)) - but it’s more efficient.
A

B and D are false! Aurora storage starts at 10GB and grows automatically as needed up to 128 TB (2^7). Also, failover in Aurora is instantaneous - it’s high availability (HA) native.

Subsection: Amazon Aurora (“don’t need deep knowledge, but you need enough high level overview to understand how it works” -_- )

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

Every time you make a change to your database, Aurora synchronously (automatically/instantaneously) creates 6 new copies of the whole database across 3 AZ.
Which of the following, if any, is/are false about this process? If any are false, what is the/are their true version(s)?
* A) 4 copies out of 6 are needed for writes
* B) 4 copies out of 6 are needed for reads
* C) Self healing with peer-to-peer replciation
* D) Storage is striped across 100s of volumes

A

B) is false. Three out of 6 copies are needed for reads. Here’s the whole quote about the confusing parts of this:

“Aurora stores copies of the data in a DB cluster across multiple Availability Zones in a single AWS Region. Aurora stores these copies regardless of whether the instances in the DB cluster span multiple Availability Zones. For more information on Aurora, see Managing an Amazon Aurora DB cluster.

When data is written to the primary DB instance, Aurora synchronously replicates the data across Availability Zones to six storage nodes associated with your cluster volume. Doing so provides data redundancy, eliminates I/O freezes, and minimizes latency spikes during system backups. Running a DB instance with high availability can enhance availability during planned system maintenance, and help protect your databases against failure and Availability Zone disruption. For more information on Availability Zones, see Regions and Availability Zones.”

https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.AuroraHighAvailability.html

Note that these copies are not the same as Read Replicas. It seems as though the 6 copies are not used unless something bad happens to your everything-else and then these 6 copies could be used, and that’s why they’re set up with the read/write permissions that they have.

Subsection: Amazon Aurora (“don’t need deep knowledge, but you need enough high level overview to understand how it works” -_- )

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

Which of the following is/are false about Aurora? If any are false, what is the/are their true version(s)?
* A) Automated failover for main in less than 30 seconds.
* B) Master + up to 10 Aurora Read Replicas serve reads
* C) No support for Cross Region Replication
* D) one master/main Aurora instance that takes writes

A

B) and C) were false! muahahahah

Master + up to fifteen Aurora Read Replicas server reads
* There is support for Cross Region Replication

Subsection: Amazon Aurora (“don’t need deep knowledge, but you need enough high level overview to understand how it works” -_- )

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

What are five important things to remember about Aurora DB Clusters?

A
  • Writer Endpoint
  • Reader Endpoint (Connection load balancing, as opposed to statement load balancing, though there’s a flashcard specifcally about this so I won’t count it as incorrect if you forgot this note)
  • Shared Storage Volume
  • Auto Expanding (10 GB to 128 TB)
  • Auto Scaling (number of Read Replicas)

Subsection: Amazon Aurora (“don’t need deep knowledge, but you need enough high level overview to understand how it works” -_- )

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

Are Aurora DB Clusters connection load balanced or statement load balanced?

A

Connection load balanced

Subsection: Amazon Aurora (“don’t need deep knowledge, but you need enough high level overview to understand how it works” -_- )

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

Which of the following, if any, is/are false about Aurora DB Clusters? If any are false, what is the/are their true version(s)?
* A) Client Writes go to a Writer Endpoint that goes to the main Aurora DB instance
* B) Client Reads go to a Reader Endpoint that uses a Connection Load Balancer to distribute connections amonst Aurora DB Read Replicas
* C) Each db (main and the replicas) are auto expanding from 10GB to 128 TB
* D) All dbs (main and the read replicas) use a shared storage volume
* E) The Read Replicas can be set up to be Auto Scaling

A

So, I think that it’s D, and that what Stephane is saying is that all the dbs (main and the read replicas and, who knows, maybe even the 6n where n=NumberOfCopies) together use a shared storage volume that can be between 10GB and 128 TB in size.

Subsection: Amazon Aurora (“don’t need deep knowledge, but you need enough high level overview to understand how it works” -_- )

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

So we’ve covered a lot of this already, but just to list out the list of features, which of the following, if any, is/are FALSE about Aurora? If any are false, what is the/are their true version(s)?
* A) Automatic failover
* B) Backup and recovery
* C) isolation and security
* D) industry compliance
* E) push-button scaling
* F) automated patching with zero downtime
* G) advanced monitoring
* H) routine maintenance
* I) backtrack (restore data at any point of time without using backups)
* J) completely free!

A

J is false. There might be some free tier eligible stuff, but overall, Aurora is not free.

Subsection: Amazon Aurora (“don’t need deep knowledge, but you need enough high level overview to understand how it works” -_- )

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

Which of the following, if any, is/are false about Relational Database Service and Aurora Security? If any are false, what is the/are their true version(s)?
* A) At rest encryption: db master and replicas encryption using AWS KMS - must be defined at launch time; if master is not encrypted, read replicas cannot be encrypted; to encrypt an un-encrypted database, go through a DB snapshot & restore as encrypted
* B) In-flight encryption (SSL-ready by default, use the AWS TLS root certificate client-side )
* C) IAM Authentication: IAM roles to connect to your db (you could do username/password too, but IAM is preferred)
* Security Groups
* No SSH (except on RDS Custom)
* Audit Logs can be enabled (and sent to CloudWatch Logs for longer retention)

A

B is false!

In-flight encryption takes place and is TLS ready by by default, not SSL ready by default (idk if you can use SSL at all here). Must use the AWS TLS root certificate client-side.

Subsection: Amazon Aurora (“don’t need deep knowledge, but you need enough high level overview to understand how it works” -_- )

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

Which of the following, if any, is/are false about Amazon RDS Proxy? If any are false, what is the/are their true version(s)?
* A) Minimize and pool connections on your RDS database EC2 instance
* B) minimize failover time (reduce by 75%)
* C) Can choose between IAM authentication and username/password

A

A) is False. Amazon RDS Proxy helps you minimize and pool connections on your RDS database instance. There’s no EC2 instance underlying your RDS database (or if there is, it’s not something to which you have access or something you need to worry about).

B) is False. Amazon RDS Proxy hels you minimize failover time and reduces it by 66%!

C) is False. Amazon RDS Proxy enforces IAM authentication for your database and securely stores credentials in AWS Secrets Manager

Subsection: RDS Proxy

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

If any of the following are untrue about Amazon RDS Proxy, what are their true versions? (Card 1 of 2)

  • A) Mostly managed database proxy for RDS
  • B) Allows apps to pool and share DB connections established with the databse
  • C) Improves db efficiency by reducing the stress on db resources (CPU, RAM) and minimize open connections and timeouts
  • D) Serverless, autoscaling and highly available (multi-AZ)
  • E) Reduced RDS & Aurora failover time by up to 66%
A

A) is False. Amazon RDS Proxy is a fully manged database proxy for RDS

Subsection: RDS Proxy

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

If any of the following are untrue about Amazon RDS Proxy, what are their true versions? (Card 2 of 2)

  • A) Supports the usual RDS db types (MySQL, PostgreSQL, MariaDB, MS SQL Server, Oracle, Aurora-MySQL and Aurora-PostgreSQL)
  • B) No code changes required for most apps
  • C) Option to use IAM Authentication or username/password to connect to database
  • D) RDS Proxy is never publically accessible (must be accessed from VPC)
A

A) is False. Amazon RDS Proxy supports the RDS db types MySQL, PostgreSQL, MariaDB, MS SQL Server, Aurora-MySQL and Aurora-PostgreSQL. Neither Stephane nor an AWS page about RDS Proxy mention Oracle.
https://aws.amazon.com/rds/proxy/

C) * is false. Enforce IAM Authentication for DB and securely store credentials in AWS Secrets Manager

Subsection: RDS Proxy

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

Is this the correct flow for Amazon RDS Proxy?
* 1) Inside of a VPC
* 2) There are Lambda functions
* 3) These Lambda functions uses IAM Authentication to authenticate to a private subnet to get to the RDS DB instance that’s inside the private subnet.

A

It is not! It doesn’t even mention an RDS Proxy at all! 3) should actually be

  • 3) These Lambda functions uses IAM Authentication to authenticate to a private subnet to get to the RDS Proxy that’s inside the private subnet.

and then there’s a fourth thing!

  • 4) From inside the private subnet, the RDS Proxy directs traffic to the correct RDS DB instance (which is also inside the private subnet)

Subsection: RDS Proxy

30
Q

Why is it useful for Amazon RDS Proxy to allow apps to pool and share DB connections established with the database?

A

“Many applications, including those built on modern serverless architectures, can have a large number of open connections to the database server and may open and close database connections at a high rate, exhausting database memory and compute resources. Amazon RDS Proxy allows applications to pool and share connections established with the database, improving database efficiency and application scalability. “
https://aws.amazon.com/rds/proxy/

Subsection: RDS Proxy

31
Q
  • A) What is a cache?
  • B) Why are caches used?
  • C) What is cache-ing (caching?)?
A
  • A) A cache is an in-memory database with really high performance and low latency
  • B) Caches are used to help reduce the load off of databases for read intensive workloads
  • C) I believe it’s the process of efficiently reusing previously retrieved or computed data

“What is Caching?
In computing, a cache is a high-speed data storage layer which stores a subset of data, typically transient in nature, so that future requests for that data are served up faster than is possible by accessing the data’s primary storage location. Caching allows you to efficiently reuse previously retrieved or computed data.
How does Caching work?
The data in a cache is generally stored in fast access hardware such as RAM (Random-access memory) and may also be used in correlation with a software component. A cache’s primary purpose is to increase data retrieval performance by reducing the need to access the underlying slower storage layer.”

https://aws.amazon.com/caching/

Subsection ElastiCache Overview

32
Q

What is the main benefit of using ElastiCache?

A

Using ElastiCache “makes it easy to deploy, operate, and scale an in-memory data store or cache in the cloud. The service improves the performance of web applciations by allowing you to retrieve information from fast, managed, in-mormory data stores, instead of relying entirely on slwoer disk-based databases.”
https://aws.amazon.com/caching/

Subsection: ElastiCache Overview

33
Q

Which of the following, if any, is/are false?
* A) Amazon ElastiCache provides managed Memecached or Ridis (in-memory datastores. I think they’re like the in-memory datastore equivalent of database systems like snowflake and Microsoft SQL Server)
* B) “Helps make your application stateless by putting the state of your application into Amazon ElastiCache” (I’m not sure how I feel about this so don’t stress about it too much)
* C) As usual, since this is AWS managed they take care of OS maintenance, patching, optimizations, setup, config, monitoring, failure recovery and backups.
* D) Does not require heavy application code changes

A

A) is false. That should be “Memcached or Redis”

Subsection: ElastiCache Overview

34
Q

True or false:
If you want to implement very basic caching with ElastiCache, you should go with ElastiCache Memcached instead of ElastiCache Redis

A

True. Memcached is supposed to be simpler to set up and use than Redis. The downside is that a bunch of extra stuff you can’t do with Memcached, but none of that matters if you only want very basic caching.

Subsection: ElastiCache Overview

35
Q

True/False:

If you want any type of special caching, like pub/sub, you could use Memcached or Redis

A

False! If you want any type of special caching, you have to use Redis. It’s supposed to be more difficult to configure, but you get more options, like using pub/sub. I do think they’re supposed to be equally fast (Memcached and Redis)?

Also, you actually can use mutlithreaded architecture and data partitioning with both Redis and Memcached. But advanced data structures are something you only get with Memcached.

Subsection: ElastiCache Overview

36
Q

Is this the following a correct order for describing the process of using ElastiCache? Note that you have to program your app to do all this reading/writing/invalidating.
* A) Client requests data from application (ex: get me all homes in texas).
* B) Application checks Amazon ElastiCache to see whether the data being requested is already stored there. If it is, this called a “cache hit”. The data gets returned to the application, who passes/shows it to the client.
* C) If the request data (get me all homes in Texas) was not in ElastiCache (this is called a “cache miss”), then the appilcation gets that data from your RDS database (idk if this would work for non-RDS databases, they don’t mention that). Then the application passes/shows that data to the client.
* D) If it was a cache miss, you application writes whatever it read from the RDS database (that is, all homes in Texas) to your Amazon ElastiCache instance. This way, the next time that information is requested, you can get it from ElastiCache.
* E) Throughout this process, there’s some type of cache invalidation strategy you need to be using (which also means you need to have programmed that logic into your app). This is done to make sure that only the most current data is stored in ElastiCache. (this is apparently the tricky part of setting up caching in your project - determining and programming an invalidation strategy.)

A

Yes!

Subsection: ElastiCache Overview

37
Q

Is the following a correct order for describing the way ElastiCache stores user session data (and the reason we can call our own application “stateless”)?
* A) User logs into one of many application deployments.
* B) Application writes the session data into ElastiCache (including the login status)
* user attempts to reach a different application instance than the one they used before
* the newly accessed application instance retrieves the data from ElastiCache and so the user is determined to be already logged in.

A

Yes.

Here’s a refresher on stateless architecture from freecodecamp.org:

“In a stateless architecture, HTTP requests from a client can be sent to any of the servers. State is typically stored on a separate database, accessible by all the servers. This creates a fault tolerant and scalable architecture since web servers can be added or removed as needed, without impacting state data” https://www.freecodecamp.org/news/stateful-vs-stateless-architectures-explained/#:~:text=In%20a%20stateless%20architecture%2C%20HTTP,needed%2C%20without%20impacting%20state%20data.

Subsection: ElastiCache Overview

38
Q

Which of these bulleted items describe ElastiCache-Redis, and which describe ElastiCache-Memcached?
* A) Read Replicas to scale reads and have high availability
* B) non-persistant
* C) Data Durability using AOF (?) persistance
* D) Backup and restore features
* E) multi threaded architecture
* F) Supports Sets and Sorted Sets
* G) Multi-node for partitioning of data (sharding)
* H) Multi AZ with Auto-Failover
* I) No high availability (no read replicas/replication of any kind)
* J) No backup and restore

A

Redis
* H) Multi AZ with Auto-Failover
* A) Read Replcias to scale reads and have high availability
* C) Data Durability using AOF (?) persistance
* D) Backup and restore features
* F) Supports Sets and Sorted Sets

Memcached
* G) Multi-node for partitioning of data (sharding)
* I) No high availability (no read replicas/replication of any kind)
* B) non-persistant
* J) No backup and restore
* E) multi threaded architecture

Subsection: ElastiCache Overview

39
Q

About Database Sharding and Read replication, which describes

A) load balancing by splitting up a database across multiple database servers (which, btw, means that if you want data stored in multiple shards that you have to recombine the data, which does negatively impact cost), and which describes

B) replicating the entire database so that your data is highly available and highly redundant?

A

A) Describes data sharding. B) describes Read replication. It sounds like you can use both together to improve performance (esp if you database is huge and accessed by a ton of people/app instances) while ensuring your data is highly available.

https://double.cloud/blog/posts/2022/09/advantages-of-sharding-vs-replication/

Subsection ElastiCache Overview

40
Q

Which of the following two situations is the better candidate for caching?
* A) Data changes slowly, few keys are frequently needed
* B) Data changes rapidly, all large key space frequently needed.
Idk what a key is, I’m thinking like a key value pair based on something said later.

A

A

Subsection: ElastiCache Strategies

41
Q

Not quite sure what they’re getting at here, but he mentioned that key value caching and caching of aggregations results were good data structures for caching, but that sounds a bit like defining a word by using the word, so I’m not quite sure I get it. No question.

A
42
Q

Lazy Loading aka Cache-Aside aka Lazy Population

write/say the python code associated with lazy loading/cache-aside/lazy population.

A
43
Q

I know it’s a rough flowchart, but can you explain the flowchart for Lazy Loading aka Cache-Aside aka Lazy Population

A

hopefully you did.

also, here are some pros and cons that later you can turn into questions if you want. for now i’m tired:

pros: only requestd data is cached (cache isn’t filled with unused data); node fails are not fatal (just increased latency to warm the cache)

cons: cache miss pentaly that results in 3 round trips, noticable delay for that request; data in the cache gets stale (the cache does not reflect changes made to the db)

Subsection, ElastiCache Strategies

44
Q

Write through - add or update cache when the database is updated. Describe the flowchart seen below/

A

hopefully you described it correctly.

Here are some associated pros and cons.
Pros:
data in cache is never stale, reads are quick; write penalty vs read penalty (each write requires two calls)
Cons:missing data until it is added / updated in the db. mitigatoin is to implement lazy loading strategy as well; cache churn - a lot of the data will never be read.

Subsection ElastiCache Strategies

45
Q

Write/say the python psuedocode for saving a user using Write-through

A

Subsection: ElastiCache Strategies

46
Q

True/False - Cache eviction refers to removing items out of your cache and there are three ways it can occur:
*A) you delete an item explicitly from the cache
*B) item is evicted because the memory of the cache is full and this particular bit of data has not be used recently (LRU - least recently used)
*C) you set an item time-to-live (TTL) which means you add something to the cache and tell the cache that you want that thing removed in a certain amount of time, like 5 minutes or something (fgood for leaderboards, comments, activity stremas etc. Can range from few seconds to days).

A

True

Subsection: ElastiCache Strategies

47
Q

true /false: write through is often combined with lazy loading, and TTL is usually not a bad idea, except with you’re using write-through (doesn’t explain why), and only cache data that makes sense (bank account info is an ex of something that does not make sense).

A

True

Subsection - ElasticCache Strategies

48
Q

Amazon MemoryDB for Redis: which of the following, if any, is false and what is/are the true versions?

  • A) redis-compatible, durable, in-memory database service
  • B) ultra fast performance with over 160 million requests / second
  • C) durable in-memory data storage with multi az transactional log
  • D) scale seamlessly from 10s GBs to 100s TB of storage
  • E) not good for: web and mobile apps, online gaming, medial streaming
A

E) is false. True version is that Amazon MemoryDB for Redis is good for web and mobile apps, online gaming, medial streaming

Subsection: Amazon MemoryDB for Redis

49
Q
A

MongoDB! That’s the one that had that really big security vulnerabilty about the admin thing.

RDS supports MySQL, PostgreSQL, MariaDB, Oracle, MS SQL Server, and Amazon Aurora.

Subsection: Quiz

50
Q
A

Multi AZ:

Good job!
Multi-AZ helps when you plan a disaster recovery for an entire AZ going down. If you plan against an entire AWS Region going down, you should use backups and replication across AWS Regions.

Here’s are the notes for the incorrect choices: Incorrect answer. Please try again.
Read Replicas don’t help with disaster recovery, it helps then you want to scale reads across AZs. Enable encryption is also wrong, but it doesn’t have a note.

Subsection: Quiz

51
Q
A

RDS Multi AZ

Good job!
Be very careful with the way you read questions at the exam. Here, the question is asking which solution is NOT adapted to this problem. ElastiCache and RDS Read Replicas do indeed help with scaling reads.

incorrect answers have no notes.

Subsection: Quiz

52
Q
A

Read replicas have asynchronous replication, therefore it’s likely your users will only read Eventual Consistency.

incorrect answers have no notes.

Subsection: quiz

53
Q
A

Multi AZ: Multi-AZ keeps the same connection string regardless of which database is up.

Note: read replicas would have been the wrong choice. Here are the notes for it:
Read Replicas add new endpoints with their own DNS name. We need to change our application to reference them individually to balance the read load.

Subsection: Quiz

54
Q
A

Correct: Storing Session Data in ElastiCache is a common pattern to ensuring different EC2 instances can retrieve your user’s state if needed.

Incorrect notes:

Subsection: Quiz

55
Q
A

Good job!
Read Replicas will help as your analytics application can now perform queries against it, and these queries won’t impact the main production RDS database.

incorrect answer notes:
- Incorrect answer. Please try again.
Multi-AZ is used for high availability, meaning that the standby DB instance can’t be used by our applications.
error alert
- Incorrect answer. Please try again.
This won’t be suitable here as the question mentioned that analytics queries can be run any time of the day.

Subsection: Quiz

56
Q
A

Enable Multi AZ

correct/incorrect answers have no notes

Subsection: Qiuz

57
Q
A

Create a read replica in a different AZ and run the analytics workload on the replica database.

correct/incorrect answers have no notes

Subsection: Quiz

58
Q
A

Create a Read Replica in a different region and enable Multi AZ on the Read Replica

job!
A Read Replica in a different AWS Region than the source database can be used as a standby database and promoted to become the new production database in case of a regional disruption. So, we’ll have a highly available (because of Multi-AZ) RDS DB Instance in the destination AWS Region with both read and write available.

incorrect answers have no notes

Subsection: Quiz

59
Q
A

Enable IAM Database Authentication

correct/incorrect answers have no notes

Subsection: Quiz

60
Q
A

RDS Read replica uses asynchronous replication and RDS multi AZ uses synchronous replication.

correct/incorrect answers have no notes

Subsection: Quiz

61
Q
A

Create a snapshot of the unencrypted RDS DB instance, copy the snapshot and tick “Enable encryption”, then restore the RDS DB instance from teh encyrpted snapshot.

correct/incorrect answers have no notes

Subsection: Quiz

62
Q
A

15

correct/incorrect answers have no notes

Subsection: Quiz

63
Q
A

Oracle

correct/incorrect answers have no notes

Subsection: Quiz

64
Q
A

No. You can not create encrypted Read Replicas from an unencrypted RDS DB instance.

incorrect answer has no notes.

Subsection: Quiz

65
Q
A

15

correct/incorrect answers have no notes

Subsection: Quiz

66
Q
A

MySQL and PostgreSQL

correct/incorrect answers have no notes

Subsection: Quiz

67
Q
A

5

correct/incorrect answers have no notes

Subsection: Quiz

68
Q
A

Cache Evictions, Scale up or out your ElastiCache Redis Cluster

correct/incorrect answers have no notes

Subsection: Quiz

69
Q
A

Lazy Loading

Correct: Lazy Loading would load data into the cache only when necessary (actively requested data from the database).

Notes from incorrect options:
error alert
Incorrect answer. Please try again.
- Write Through would add or update data in the cache whenever data is written to the database.
- TTL is also wrong but has no notes

Subsection: Quiz

70
Q
A

Correct answer: Write through.

This has longer writes, but the reads are quick and the data is always updated in the cache.

Incorrect answer notes:
- Incorrect answer. Please try again.
Same as Lazy Loading, there’s a read penalty in case of cache misses.
- TTL is also wrong, but has no notes

Subsection: Quiz