Performant Architectures Flashcards
When replicating data from a primary RDS instance to a secondary one, how much will you be charged, in relation to the standard data transfer charge?
A) Your data will be transferred at the standard data transfer charge.
B) Your data will be transferred at half of the standard data transfer charge.
C) Your data will be transferred at half of the standard data transfer charge up to 1 GB of transfer per day and then additional data at the standard data transfer charge.
D) There is no charge for primary-to-secondary data replication.
D. There is no way to reason through this; it is a matter of memorization. There is no charge associated with data replication in this scenario.
Which of the following are valid options for where an RDS read replica is set up in relation to the primary instance? (Choose two.)
A) In the same region as the primary instance
B) In a separate region from the primary instance
C) In an instance running on premises
D) Both A and B
C, D. All of these are valid options. Although it’s not particularly common, you can set up a read replica in an on-premises instance. Additionally, read replicas are often created in separate regions from the primary instance, to improve performance for clients closer to different regions than the primary instance.
What is the primary purpose of a read replica RDS configuration?
A) Disaster recovery
B) Fault tolerance
C) Performance
D) Security
C. A read replica configuration is aimed squarely at increasing database performance, specifically the performance of reading data from an RDS instance.
Which of the following databases support read replicas?
A) MariaDB
B) MySQL
C) PostgreSQL
D) All of the above
D. All three of these databases support read replicas. Most other databases supported by RDS (Oracle, for example, or Aurora) offer other approaches to gain similar functionality to read replicas but do not support the AWS read replica functionality.
Which of the following databases support read replicas?
A) Oracle
B) MySQL
C) DynamoDB
D) All of the above
B. Currently, read replicas in RDS are only supported by MariaDB, MySQL, and PostgreSQL.
Which of the following is true about a read replica? (Choose two.)
A) It is a read-only instance of a primary database.
B) It can only exist in the same region as the primary database, although it can be in a different availability zone.
C) It is updated via asynchronous replication from the primary instance.
D) It is updated via synchronous replication from the primary instance.
A, C. A read replica is a read-only instance of a database created from a snapshot of the primary instance (A). Read replicas can be in the same instance, or a different one, as the primary instance (so B is false). Read replicas are updated via asynchronous replication—the most performant approach—from the primary database.
Which of the following is true about an RDS read replica configuration? (Choose two.)
A) Only three read replicas can be set up for a single primary database instance.
B) Only MariaDB, MySQL, and Aurora are supported.
C) A read replica replicates all databases in the primary instance.
D) A read replica can exist in a different region than the primary instance.
C, D. Read replicas can be in a different region than the primary instance (D), and they replicate all the databases in the primary instance (C). You can have up to five read replicas at a time for a single instance (so A is false). While MySQL and MariaDB are supported (B), Aurora is not.
You have a primary database set up to use read replicas running on an instance in US East 1. You have three read replicas also in US East 1 and two additional replicas in US West 2. You are trying to create a new replica in EU West 1 and are getting an error. What do you need to do to resolve this error and successfully create a new read replica in EU West 1?
A) Turn on the Multi-AZ option for your primary instance.
B) You can’t create the replica in EU West 1. Instead, create the replica in another US region to avoid regulations about read replicas in the EU.
C) Contact AWS about raising the number of read replicas allowed from 5 to 8.
D) Turn off one of the read replicas in US East 1 and then you can create the instance in EU West 1.
D. The root issue here is that a read replica setup only allows for five read replicas. This is not a limit that can be raised by AWS either (so C is out). Option A won’t address the issue, and option B isn’t accurate; there are no EU limitations affecting the issue here. The only answer that would result in being able to create the instance is D: By turning off an existing instance, you can create a new fifth replica in the desired region.
Which of the following are true about a read replica setup? (Choose two.)
A) Backups are configured by default when you set up read replicas.
B) They provide a highly scalable solution for your on-premises databases.
C) They can exist within a single AZ, cross-AZ, or cross-region.
D) A read replica can be promoted to a stand-alone database instance.
C, D. Read replicas are focused on performance, so you can generally eliminate any answers related to disaster recovery—in this case, A. Read replicas work with RDS databases, as well, so B is out; on-premises databases aren’t supported. This leaves C and D, which are both valid.
Which of the following are true about a read replica setup? (Choose two.)
A) Automated backups are taken from the read replicas rather than the primary instance.
B) The database engine on all instances is active.
C) Each read replica instance can upgrade its database engine separate from the primary instance.
D) Replication is synchronous.
B, C. No backups are taken from any instance automatically, including the primary instance, so A is false. Since each read replica has its own database instance running, both B and C are valid. Replication is asynchronous rather than synchronous (so D is false).
Which of the following statements are false? (Choose two.)
A) Both read replicas and Multi-AZ configurations ensure that you have database instances in multiple availability zones.
B) Both read replicas and Multi-AZ configurations provide disaster recovery options for your primary instance.
C) A single database can both have a read replica and be part of a Multi-AZ setup.
D) A read replica can be promoted to be a stand-alone database instance.
A, B. A is false because you can create read replicas in the same AZ as the primary instance. There is no requirement to use multiple AZs, as there is with a Multi-AZ setup. B is also false; read replicas provide no disaster recovery options. Both C and D are true.
Which of the following statements is true?
A) A Multi-AZ setup is aimed at fault tolerance, while a read replica setup is aimed at scalability.
B) Both read replicas and Multi-AZ configurations are aimed at fault tolerance.
C) A Multi-AZ setup is aimed at scalability, while a read replica setup is aimed at fault tolerance.
D) Both read replicas and Multi-AZ configurations are aimed at scalability.
A. Only A is correct. A Multi-AZ setup is focused on disaster recovery and fault tolerance, while read replicas provide performance and scalability.
How do applications communicate with read replica instances?
A) Through the read replica REST API provided by RDS
B) ELBs and ALBs will automatically translate requests to a read replica to use the read replica REST API provided by RDS.
C) Each read replica provides a read replica key that allows applications to communicate with the instance as if it were a normal database instance.
D) Applications communicate with a read replica exactly as they would with a non-read replica.
D. There is no difference in how applications communicate with read replicas as compared to the communication with non-replica instances. In fact, applications don’t “know” that they’re communicating with a read replica other than an inability to make writes.
Which of the following are valid reasons to use read replication? (Choose two.)
A) You have a read-heavy database that is peaking in traffic.
B) You have a large number of errors reported by applications trying to update user entries in your current database and want to reduce these errors.
C) You want an automated disaster recovery solution in case you lose an AZ.
D) You have a large number of business reporting queries that are currently interfering with customer application performance.
A, D. A and D are both solutions that would be aided by additional read-only instances. B is not a valid answer because updating records would still only be possible with the primary instance; read replicas don’t support writes. C is incorrect because read replicas do not provide automated fault recovery.
Does a read replica provide any assistance at all in creating a fault-tolerant database setup?
A) Yes, it provides automated backups to the read replicas.
B) Yes, if the primary instance fails, one of the replicas can be manually promoted to a stand-alone database instance.
C) Yes, if the primary instance fails, one of the replicas will be automatically promoted to a stand-alone database instance.
D) No
B. You need to be careful here. While read replicas are not advertised or even suggested as solutions for disaster recovery, option B does provide a somewhat manual process to use them in that manner. While you get no automated backups or failover (A or C), you can manually promote a read replica instance to a stand-alone instance if you have to. Still, a Multi-AZ setup is almost always a more robust solution for fault tolerance.
Which of the following are valid reasons to use read replication? (Choose two.)
A) You have customers in a region geographically distant from your primary instance and want to improve their read performance when they access your applications hosted in regions closer to them.
B) Your current database instance is showing memory saturation with current traffic loads.
C) Your boss has asked for an automated backup solution that takes advantage of AWS managed services.
D) You need to perform additional OLTP queries and want to improve the performance of those queries.
A, B. Both A and B are ideal situations for read replicas. C is the usual incorrect answer: read replicas don’t provide automated backups. And D is not accurate; the actual database processing doesn’t improve; you are merely adding more sources for reading data for clients.
Can you configure a database instance to be both a read replica and a primary database instance for the original instance?
A) Yes, as long as the instances are all in the same availability zone.
B) Yes, if you turn on circular replication in both primary database instances.
C) Yes, as long as the instances are not in the same availability zone.
D) No, AWS does not support circular replication.
D. AWS does not support circular replication through RDS. While some of the databases supported by RDS do, RDS itself does not provide access to this functionality.
In which of the following ways can you create a read replica? (Choose two.)
A) Through the AWS console
B) Through the AWS online support system
C) Through the AWS API
D) Through Elastic Beanstalk
A, C. You can create a read replica through the AWS console (A), the AWS API (C), and the AWS CLI (not mentioned, but still true).
How are automated backups related to read replicas?
A) They are not; read replicas and automated backups have no relationship at all.
B) Read replicas do not create automatic backups, but the primary database instance must have automatic backups enabled to create read replicas.
C) Read replicas cause the primary database instance to automatically begin backing up.
D) Each read replica is automatically backed up after an initial read from the primary database instance.
B. As has been said numerous times, read replicas are not a backup strategy, nor do they cause automatic backups to be set up. However, you must turn on automatic backups for the primary database instance to enable read replicas.
Can a database instance be a read replica of one database and the source instance for another read replica?
A) Yes, as long as the source and replicant database are not the same instance.
B) No, a database cannot be both a read replica and a source database.
C) Yes, as long as the source and replicant database are in the same availability zone.
D) Yes, as long as you enable circular replication on both databases.
A. This bears careful reading. Amazon RDS does not support circular replication, which means one database reads from a second database but then is replicated back by that second database. However, it is absolutely permissible for one database to replicate another database and then be the source for a third database. This makes option A correct.
How quickly can you make changes to the backup window used by your RDS instance?
A) Changes to the window via the console take place within 1 hour; changes made via the API take place immediately.
B) Changes to the window take place after the next complete backup occurs.
C) Changes to the window via the API take place within 1 hour; changes made via the console take place immediately.
D) Changes to the window take place immediately.
D. There is no difference in response to a change in the backup window based on how that window is changed (API, console, etc.). All changes take place immediately.
What is the longest backup retention window that Amazon RDS allows?
A) 30 days
B) 35 days
C) 45 days
D) 365 days
B. This is another straight memorization question: Amazon RDS backups can be retained for up to 35 days, and no longer.
You have an Oracle installation using a custom geospatial plug-in. You also want to ensure the maximum throughput for database operations once those operations are begun by the plug-in. How would you set up Oracle to meet these requirements?
A) Set up Oracle using RDS with provisioned IOPS.
B) Set up Oracle using RDS with magnetic storage.
C) Install Oracle on an EC2 instance with a provisioned IOPS EBS volume.
D) Install Oracle on an EC2 instance with a magnetic EBS volume.
C. There are two components to this question: using RDS or EC2 for Oracle hosting and the class of storage to select. While RDS is a better option in the general case, it is likely not possible to use RDS in this scenario due to the custom plug-in required. This eliminates A and B. Given an installation on EC2, then, the question becomes which storage class is faster: provisioned IOPS or magnetic. The answer here is always provisioned IOPS.
In what scenarios would you install an Oracle database on an EC2 instance rather than using RDS? (Choose two.)
A) You want to use an ALB to support multiple instances and round-robin request distributions.
B) Your database size is greater than 80% of the maximum database size in RDS.
C) You have custom plug-ins that will not run in RDS.
D) You want to ensure that your database is only accessible through your private subnet in a VPC.
B, C. Option C should be the immediately obvious first choice. Anytime you have custom plug-ins, you will likely need to install your database on an EC2 instance rather than using RDS. Options A and D are really both about network routes and services around your database, and both can be accomplished without affecting your EC2 vs. RDS decision. This leaves B, which also logically makes sense: If you have a very large database, and it will grow (as almost all databases do), then sizing restraints on RDS can be a limiting factor.