Question : Your Database engine needs to build indexes. You configure a read replica from the current production system and start the index building on the read replicas. What do you need to do once the indexes are complete? 1. Change the DNS to the read replica 2. Request AWS to change endpoint to read replica 3. Access Mostly Uused Products by 50000+ Subscribers 4. None of the above
Explanation: There are a number of different uses for this new feature. Here are some suggestions to get you started:
Perform DDL Operations Table level DDL operations such as adding columns or indices can take a long time and can impose a performance penalty on your master database instance. Here is another way to do it:
Execute the operations on a designated Read Replica and wait for them to complete. Wait for the Read Replica to catch up with the master database instance. Promote the Read Replica to a master. Direct all database traffic to the newly promoted master. Create additional Read Replicas for performance purposes as needed. Terminate the original master and any remaining Read Replicas associated with it. Shard a Table Sharding involves splitting a table into smaller tables, often using a hashing algorithm on the table's primary key to partition the key space across tables. You can move from a single table model to a sharded model using Read Replicas and Promotion as follows:
Create a Read Replica for each shard. Wait for each of the new Read Replicas to become available. Promote the Read Replicas to masters. Direct database traffic to the new sharded masters. On each shard, delete the rows that belong to the other shards. Terminate the original master. Implement Failure Recovery Amazon RDS provides multiple options for data recovery during failures including Multi AZ deployments and Point in Time Recovery. With the ability to promote, Read Replica can be considered as an additional data recovery scheme against failures. However, you will want to make sure that you understand the ramifications of the asynchronous replication model and its limitations before electing to use this option as a recovery mechanism. If your use case requires synchronous replication, automatic failure detection and failover, we recommend you run your DB Instance as a Multi AZ deployment. If you do want to use Read Replica as a data recovery mechanism, you would start by creating a Read Replica, and then monitoring the master for failures. In the event of a failure you would proceed as follows:
Promote the Read Replica. Direct database traffic to the new master. Create a replacement Read Replica.
Question : Which storage engine is required for MySQL read replicas?
Explanation: The PointIn Time Restore and Snapshot Restore features of Amazon RDS for MySQL require a crash recoverable storage engine and are supported for InnoDB storage engine only. While MySQL supports multiple storage engines with varying capabilities, not all of them are optimized for crash recovery and data durability. For example, MyISAM storage engine does not support reliable crash recovery and may result in lost or corrupt data when MySQL is restarted after a crash, preventing Point In Time Restore or Snapshot restore from working as intended.
Read Replicas require a transactional storage engine and are only supported for the InnoDB storage engine.
Non transactional engines such as MyISAM might prevent Read Replicas from working as intended. However, if you still choose to use MyISAM with Read Replicas, we advise you to watch the Amazon CloudWatch Replica Lag metric (available via the AWS Management Console or Amazon CloudWatch APIs) carefully and recreate the Read Replica should it fall behind due to replication errors. The same considerations apply to the use of temporary tables and any other non transactional engines.
Explanation: DB Security Groups vs. VPC Security Groups
The following table shows the key differences between DB security groups and VPC security groups.
DB Security Group Controls access to DB instances outside a VPC Uses Amazon RDS APIs or Amazon RDS page of the AWS Management Console to create and manage group or rules When you add a rule to a group, you do not need to specify port number or protocol. Groups allow access from EC2 security groups in your AWS account or other accounts. Security Group Scenario
VPC Security Group Controls access to DB instances in VPC. Uses Amazon EC2 APIs or Amazon VPC page of the AWS Management Console to create and manage group or rules. When you add a rule to a group, you should specify the protocol as TCP, and specify the same port number that you used to create the DB instances (or Options) you plan to add as members to the group. Groups allow access from other VPC security groups in your VPC only.
A common use of an RDS instance in a VPC is to share data with an application server running in an EC2 instance in the same VPC and that is accessed by a client application outside the VPC. For this scenario, you would do the following to create the necessary instances and security groups. You can use the RDS and VPC pages on the AWS Console or the RDS and EC2 APIs.
Create a VPC security group (for example, "sg-appsrv1") and define inbound rules that use as source the IP addresses of the client application. This security group allows your client application to connect to EC2 instances in a VPC that uses this security group.
Create an EC2 instance for the application and add the EC2 instance to the VPC security group ("sg-appsrv1") you created in the previous step. The EC2 instance in the VPC shares the VPC security group with the DB instance.
Create a second VPC security group (for example, "sg-dbsrv1") and create a new rule by specifying the VPC security group you created in step 1 ("sg-appsrv1") as the source.
Create a new DB instance and add the DB instance to the VPC security group ("sg-dbsrv1") you created in the previous step. When you create the instance, use the same port number as the one specified for the VPC security group ("sg-dbsrv1") rule you created in step 3.