Question

Difficulty: HardPerformance and Scalability Optimization

A global food delivery application is launching a real-time order tracking feature. During daily lunch and dinner peak hours, order tracking activity increases significantly. The system must support a peak of 50,00050,000 database writes per second for order status updates, and a peak of 250,000250,000 database reads per second for customers checking their order status. The backend architecture consists of an Application Load Balancer (ALB), an Auto Scaling group of Amazon EC2 instances, and an Amazon Aurora MySQL database cluster with one writer and one reader instance. During peak hours, database CPU utilization on the writer node spikes to 95%95\%, causing order status update delays and connection timeouts. The application requires sub-second latency for all operations. Which of the following database tier optimization strategies will meet these requirements while maintaining operational efficiency and high availability?

  1. Deploy an Amazon ElastiCache for Redis cluster to cache the active order status records. Configure the application to query the cache first and update the cache when database writes occur. Enable Aurora Auto Scaling to dynamically adjust the number of Aurora Replicas based on CPU utilization to handle residual queries routed to the reader endpoint.Answer
  2. B
    Configure the Aurora cluster as a Multi-AZ deployment, and configure the application's read connection pool to direct status query traffic to the passive standby instance's endpoint to distribute read workloads.
  3. C
    Submit an AWS Support ticket to pre-warm the Application Load Balancer before the daily lunch and dinner peak windows, and scale the primary Aurora writer instance vertically to a larger instance class to handle the peak write and read traffic.
  4. D
    Configure the EC2 Auto Scaling group scaling policy with a cooldown period of 1010 seconds to ensure instances launch immediately when CPU spikes, and configure Aurora Auto Scaling to dynamically scale the primary writer instance's size to match the query throughput.

Answer

Deploy an Amazon ElastiCache for Redis cluster to cache the active order status records. Configure the application to query the cache first and update the cache when database writes occur. Enable Aurora Auto Scaling to dynamically adjust the number of Aurora Replicas based on CPU utilization to handle residual queries routed to the reader endpoint.
The correct strategy offloads read operations (250,000250,000 reads per second) to a fast caching tier using Amazon ElastiCache for Redis. This reduces the CPU utilization on the database cluster significantly. Any database reads that miss the cache are directed to the Aurora reader endpoint, which scales horizontally via Aurora Auto Scaling. This handles the scale requirement efficiently and maintains sub-second latency.

Step-by-Step Solution

1
Analyze the database bottleneck under the specified workload.
Identify that the primary writer node is overloaded due to a mix of 50,00050,000 writes per second and 250,000250,000 reads per second.
Determining that horizontal scaling or caching is needed because vertical scaling of a single writer cannot sustain this combined throughput.
2
Implement a caching tier for hot reads.
Deploy Amazon ElastiCache for Redis to cache order status read requests.
Caching offloads the vast majority of the 250,000250,000 reads per second from the database cluster, lowering latency and CPU load.
3
Configure read scaling for remaining database queries.
Configure Aurora Auto Scaling to scale reader replicas based on average CPU utilization, routing reads via the reader endpoint.
This handles any cache misses or residual read traffic dynamically without affecting the primary writer node.

Key Concept

Database Read Scaling and Caching Strategy
Rate this question