- Newest
- Most votes
- Most comments
The correct answer is B. Implement an Amazon ElastiCache for Redis cache to store the results of the database calls. Modify the Lambda functions to use the cache.
This strategy meets the requirements for several reasons:
- Caching reduces database queries: By storing frequently accessed data in the cache, you can minimize the number of database calls, reducing the load on the Aurora Serverless DB cluster and alleviating memory errors.
- Improved performance: Caching provides faster response times, as Lambda functions can retrieve data from the cache instead of querying the database.
- Cost-effective: Implementing a cache is more cost-effective than increasing database resources or modifying the API Gateway endpoint.
- Scalability: ElastiCache for Redis is a scalable solution that can handle increased traffic during business hours, holidays, and events.
Edge-optimized api gateway can also enabling caching at the API Gateway level can significantly reduce the number of calls made to the backend Lambda functions and database, why is this not correct?
API Gateway caching can:
- Reduce the number of requests to Lambda functions and the database
- Decrease latency by serving cached responses directly from edge locations
- Lower costs by minimizing the number of requests to backend resources
So, option A: Convert the API Gateway Regional endpoint to an edge-optimized endpoint and enable caching in the production stage, is indeed a correct and efficient solution to address the issue.
Enabling caching at the API Gateway level is a great solution because it:
- Caches responses at the edge, closer to clients, reducing latency
- Reduces the load on Lambda functions and the database
- Is a managed service, easy to configure and maintain
Creating an Elastic Cache will also be more costly compared to edge-optimized endpoint?
Yes, creating an Elastic Cache would generally be more costly compared to using an edge-optimized endpoint.
Use edge-optimized endpoint and caching in API Gateway. This will make the API faster and reduce load on the database.
Yes, creating an ElastiCache for Redis can be more costly compared to enabling caching at the API Gateway level, especially with an edge-optimized endpoint.
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 13 days ago
- AWS OFFICIALUpdated 2 years ago
A. Convert the API Gateway Regional endpoint to an edge-optimized endpoint. Enable caching in the production stage.
Here's why:
Edge-optimized endpoint: This will bring the API Gateway closer to the clients, reducing latency and improving response times. Caching: This will store frequently accessed data in memory at the edge, reducing the load on the database and improving performance.