SAP-C01: AWS Certified Solutions Architect - Professional Exam

Optimizing AWS Architecture for High Throughput Social Media Site

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 a high number of small reads and writes per second and relies on an eventual consistency model.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - A and D.

One of AWS pillars of a well-architected framework is cost optimization which incorporates "Right Sizing"

AWS defines right Sizing using the lowest cost resource that still meets the technical specifications of the specific workload.

Options B and C do not meet those AWS standards.

Option A is CORRECT because ElastiCache is an in-memory caching solution that reduces the load on the database and improves the read performance.

Option B is INCORRECT because splitting the RDS into multiple databases increases both the read and write.

Therefore wasting money on increased write capacity is not required.

Also, Sharding increases the maintenance overhead as now multiple databases must be maintained and the application must be refactored to incorporate the additional connection strings.

Option C is INCORRECT because this increases both read and write.

Therefore wasting money on increased write capacity which is not required.

Option D is CORRECT because Read Replicas are used to elastically scale out beyond the capacity constraints of a single DB instance for read-heavy database workloads.

Hence, improving the read performance.

See more information on Read Replicas and ElastiCache below.

Read Replicas.

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

This replication feature makes it easy to elastically scale out beyond a single DB Instance's capacity constraints 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/

ElastiCache.

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 web applications' performance 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 scenario described above involves a social media site running on EC2 instances in multiple availability zones with a Multi-AZ RDS MySQL Extra Large DB Instance. The site performs a high number of small reads and writes per second and relies on an eventual consistency model. The question asks which of the following options would be the best solution to improve the performance and scalability of the site.

A. Deploy ElasticCache in-memory cache running in each availability zone. ElasticCache is an in-memory caching service that can be used to improve the performance and scalability of web applications. By deploying ElasticCache in each availability zone, the application can cache frequently accessed data closer to the application, reducing latency and improving performance. However, since ElasticCache is eventually consistent, it may not be the best solution for applications that require strong consistency.

B. Implement sharding to distribute the load to multiple RDS MySQL instances. Sharding involves dividing the data into multiple smaller data sets, each of which is stored on a separate RDS MySQL instance. This can help distribute the load and improve performance. However, sharding can be complex and requires careful planning and management. In addition, it may not be the best solution for applications that require strong consistency.

C. Increase the RDS MySQL Instance size and implement provisioned IOPS. Increasing the RDS MySQL instance size and implementing provisioned IOPS can improve the performance of the database by providing more processing power and storage resources. Provisioned IOPS ensures that the database can handle the high number of reads and writes by providing a predictable level of performance. This option is simple and can be implemented quickly, but it may not be the best solution for applications that require strong consistency.

D. Add an RDS MySQL read replica in each availability zone. Adding RDS MySQL read replicas in each availability zone can improve performance by allowing reads to be distributed across multiple database instances. This can reduce latency and improve response times for read-intensive workloads. However, it may not be the best solution for applications that require strong consistency, as the replicas may lag behind the primary database in terms of consistency.

Overall, the best option will depend on the specific requirements of the application. If eventual consistency is acceptable, option A may be the best solution. If strong consistency is required, options C or D may be more appropriate. Option B may also be a viable solution, but it requires careful planning and management.