AWS Architecture: Alleviating Performance Issues with EC2 Instances and RDS Database

Increase Performance with Enhanced Architecture

Prev Question Next Question

Question

You have the following architecture deployed in AWS. a) A set of EC2 Instances which sit behind an ELB b) A database hosted in Amazon RDS Of late, the performance on the database has been slacking due to a high number of read requests.

Which of the following can be added to the architecture to alleviate the performance issue? (Select TWO.)

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer - A and B.

Option A is correct.

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

This 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"

Amazon ElastiCache is an in-memory cache that can be used to cache common read requests.

The below diagram shows how caching can be added to an existing architecture:

For more information on database caching, please visit the URL below:

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

Note:

Option C is incorrect because CloudFront is a valuable component of scaling a website, especially for geo-location workloads and queries, more advanced for the given architecture.

Option D is incorrect because it will have latency and additional changes as well.

t > 1 7 -
| le!

| te

\ Web Server } Web Server
i B38
|

|

|

|

|

e+ 8

App Server

Database Caching
Query Results

q
|
|
|
|
|
|
|
App Server i}
|
|
|
|
|
|
|

The scenario describes an architecture in which a set of EC2 instances are sitting behind an Elastic Load Balancer (ELB), while a database is hosted in Amazon RDS. The database is experiencing performance issues due to a high volume of read requests. To address this issue, two possible solutions can be implemented:

  1. Add read replica to the primary database to offload read traffic: A read replica is a copy of a primary database instance that is kept in sync with the primary database. The read replica can be used to offload read traffic from the primary database, as read requests can be directed to the read replica instead of the primary database. This can help to reduce the load on the primary database and improve its performance.

  2. Use ElastiCache in front of the database: Amazon ElastiCache is a managed in-memory data store that can be used to improve the performance of read-heavy applications. By caching frequently accessed data in memory, ElastiCache can help to reduce the number of read requests that need to be sent to the database. This can help to improve the performance of the database by reducing the load on it.

Option C, using AWS CloudFront in front of the database, is not a recommended solution for improving database performance as CloudFront is a content delivery network (CDN) that is used to improve the delivery of static content, such as images, videos, and other files, to end-users. CloudFront is not designed to be used as a caching layer for a database.

Option D, using Amazon DynamoDB to offload all the reads and populating the common read items in a separate table, is not a recommended solution in this scenario. While DynamoDB can be used as a high-performance NoSQL database that can handle large volumes of read and write requests, it is not an appropriate solution for this scenario. DynamoDB is a separate database service that requires data to be migrated from the existing RDS database to DynamoDB, which can be time-consuming and complex.

Therefore, the two recommended solutions for improving database performance in this scenario are to add read replicas to the primary database and to use ElastiCache in front of the database.