AWS RDS Performance Optimization Solutions

Resolve AWS RDS Performance Issues

Prev Question Next Question

Question

An application is currently in production that makes calls to an AWS RDS Instance.

The database has recently been facing performance problems.

It has been noticed that some static read queries are putting a strain on the database.

Which of the following can be used to resolve the issue?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - D.

The AWS Documentation mentions the following.

Proposed solution: an in-memory cache based on Amazon ElastiCache.

Because the issue involves latency to the backend database, we propose an in-memory cache based on Amazon ElastiCache to reduce network latency and offload the database pressure.

This solution dramatically reduces the data retrieval latency.

It also scales request volume considerably because Amazon ElastiCache can deliver extremely high request rates, measured at over 20 million per second.

The following diagram shows the proposed architecture.

Option A is incorrect since normally CloudFront distribution is placed in front of the front tier of the application.

Option B is incorrect since this is used for fault-tolerant scenarios for the database.

Option C is incorrect since this is used for queuing messages.

For more information on reducing latency's for hybrid architectures, please refer to the below URL-

https://aws.amazon.com/blogs/database/latency-reduction-of-hybrid-architectures-with-amazon-elasticache/
Proposed solution: an in-memory cache based on Amazon ElastiCache

Because the issue involves latency to the backend database, we propose an in-memory cache based on Amazon ElastiCache to reduce network latency and to offload the database
pressure. This solution dramatically reduces the data retrieval latency. It also scales request volume considerably, because Amazon ElastiCache can deliver extremely high request rates,

measured at over 20 million per second. The following diagram shows the proposed architecture.

Architecture to reduce latency and improve performance

&

Veavu
LY,
Tame
fe) Reads from cache
ee > —> <
Global \ J
Customers i
internet Elastic Load Web / App
Balancer Seryers
(ELB)
y ~ Fill cache
( with read
results
Og . Save modifications into database CACHE
__ + >
Tae
Database
Internal App Database cache

Users

Out of the given options, the most suitable one to resolve the issue of the database facing performance problems due to static read queries is D. Place an ElastiCache in front of the database.

Explanation: An ElastiCache is a web service that makes it easy to deploy and run an in-memory cache in the cloud. By placing an ElastiCache in front of the database, the static read queries can be served from the cache instead of the database, thereby reducing the strain on the database and improving performance.

Option A - Place a CloudFront distribution in front of the database: CloudFront is a content delivery network that is used to deliver content to end-users with low latency and high transfer speeds. However, it is not designed to alleviate the load on a database.

Option B - Enable Multi-AZ for the database: Multi-AZ (Availability Zone) is a feature of RDS that provides high availability and automatic failover to another AZ in case of a database instance failure. While this can help with database availability, it does not address the issue of performance problems due to static read queries.

Option C - Place an SQS queue in front of the database: Amazon Simple Queue Service (SQS) is a fully managed message queuing service that enables decoupling and scaling microservices, distributed systems, and serverless applications. However, it is not designed to alleviate the load on a database.

Therefore, the most appropriate option to resolve the issue is D. Place an ElastiCache in front of the database.