Best Approaches to Address Read Contention on RDS MySQL

AWS Certified DevOps Engineer - Professional Exam: DOP-C01

Prev Question Next Question

Question

Your company is getting ready to make a major public announcement of a social media site on AWS.

The website runs on EC2 instances deployed across multiple Availability Zones with a Multi-AZ RDS MySQL Extra Large DB Instance.

The site performs many small reads and writes per second and relies on an eventual consistency model.

After comprehensive tests, you discover that there is read contention on RDS MySQL.

Which are the best approaches to meet these requirements? Choose 2 answers from the options below.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - A and D.

Implement Read Replicas and Elastic Cache.

Amazon RDS Read Replicas provide enhanced performance and durability for database (DB) instances.

This replication feature makes it easy to elastically scale out beyond the capacity constraints of a single DB Instance for read-heavy database workloads.

You can create one or more replicas of a given source DB Instance and serve high-volume application read traffic from multiple copies of your data, thereby increasing aggregate read throughput.

For more information on Read Replica's, please visit the below link:

https://aws.amazon.com/rds/details/read-replicas/

Amazon ElastiCache is a web service that 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 applications by allowing you to retrieve information from fast, managed, in-memory data stores instead of relying entirely on slower disk-based databases.

For more information on Amazon ElastiCache, please visit the below link:

https://aws.amazon.com/elasticache/

The best approaches to meet the requirements of resolving read contention on RDS MySQL are:

A. Deploy ElasticCache in-memory cache with Multi-AZ: ElasticCache is a fully-managed in-memory caching service offered by AWS that helps in reducing the load on the RDS MySQL database by caching frequently accessed data. ElasticCache can be deployed in front of the RDS MySQL database in the same or different Availability Zones (AZs) to provide high availability and reduce latency. ElasticCache can be configured to use various caching engines like Memcached or Redis. By deploying ElasticCache, the website's read performance can be improved by reducing the number of read requests that hit the RDS MySQL database.

C. Increase the RDS MySQL Instance size and Implement provisioned IOPS: Increasing the RDS MySQL instance size and implementing provisioned IOPS can improve the database's read and write performance. Provisioned IOPS provides consistent and low-latency performance for I/O-intensive applications. Increasing the RDS MySQL instance size will provide more CPU, memory, and network resources to handle the database's workload. This approach can be useful if the database is not already running at maximum capacity.

Option B, Implement sharding to distribute load to multiple RDS MySQL instances, is not a suitable approach for resolving read contention on RDS MySQL in this scenario because sharding is typically used to horizontally partition a database across multiple servers to distribute the load across them. However, sharding requires significant changes to the application's data access layer and is a complex process that requires careful planning.

Option D, Add an RDS MySQL read replica in each availability zone, is not a suitable approach because read replicas are used for improving the read scalability and availability of the database. However, read replicas do not provide a solution for resolving read contention on a single RDS MySQL instance. In this case, deploying ElasticCache or increasing the RDS MySQL instance size with provisioned IOPS would be more effective.