Question

Difficulty: HardOptimizing Compute and Storage Performance

A financial services company runs a batch processing pipeline on Amazon EC2 instances in an Auto Scaling group. The EC2 instances process raw data and write intermediate transaction metadata to an Amazon RDS for PostgreSQL DB instance configured in a Multi-AZ deployment. The final reports are saved to an Amazon S3 bucket.

During peak processing periods, the database performance degrades significantly. CloudWatch metrics indicate a write latency (WriteLatencyWriteLatency) of over 45 ms45\text{ ms} on the RDS DB instance, while CPU utilization remains below 25%25\%. The DB instance uses General Purpose SSD (gp3) storage with default configurations.

Additionally, during sudden traffic spikes, the EC2 instances struggle to scale out quickly enough to prevent processing queues from backing up. The custom AMI used by the Auto Scaling group takes approximately 7 minutes7\text{ minutes} to bootstrap and start application services. The Auto Scaling group uses a target tracking scaling policy based on CPU utilization with a default cooldown period of 150 seconds150\text{ seconds}.

Which two actions should a Solutions Architect take to resolve these performance bottlenecks?

  1. Modify the RDS PostgreSQL DB instance storage type to Provisioned IOPS SSD (io2) to increase the available IOPS and throughput capacity.Answer
  2. Configure an Auto Scaling warm pool for the EC2 Auto Scaling group to keep pre-warmed instances in a Stopped state, and increase the default cooldown period to 450 seconds450\text{ seconds}.Answer
  3. C
    Enable read-replica auto-scaling on the Multi-AZ secondary standby instance to offload heavy write transactions to the secondary Availability Zone.
  4. D
    Request AWS Support to pre-warm the Application Load Balancer (ALB) to handle the incoming transaction load and bypass the EC2 instance boot time.
  5. E
    Decrease the Auto Scaling group cooldown period to 60 seconds60\text{ seconds} to allow the scaling policy to trigger consecutive scaling activities more rapidly during spikes.

Answer

To resolve the performance bottlenecks, the Solutions Architect should modify the RDS PostgreSQL DB instance storage type to Provisioned IOPS SSD (io2) and configure an Auto Scaling warm pool for the EC2 Auto Scaling group while increasing the default cooldown period to 450 seconds450\text{ seconds}.
Provisioning io2 storage addresses the write latency bottleneck by providing dedicated I/O performance independent of storage size. Configuring a warm pool with instances in a Stopped state significantly speeds up the scale-out process by bypassing most of the 7 minute7\text{ minute} bootstrapping delay, while increasing the cooldown period to 450 seconds450\text{ seconds} ensures the scaling policy waits for the newly launched instances to become healthy before triggering further scaling actions.

Step-by-Step Solution

1
Analyze the RDS storage bottleneck.
Identify that the DB instance is experiencing high write latency with low CPU utilization, indicating that the default gp3 IOPS/throughput is insufficient.
Choosing Provisioned IOPS SSD (io2) storage will resolve the write queue delay by delivering dedicated, higher I/O performance.
2
Analyze the EC2 scaling delay.
Identify that the 7 minute7\text{ minute} bootstrapping process causes a scaling lag, which is exacerbated by a cooldown period that is too short (150 seconds150\text{ seconds}).
Configuring a warm pool allows pre-bootstrapped instances to quickly transition to the Running state, reducing scaling lag.
3
Adjust the Auto Scaling group cooldown setting.
Increase the cooldown period to 450 seconds450\text{ seconds} (exceeding the 7 minute7\text{ minute} bootstrapping duration).
This prevents the scaling policy from launching additional instances prematurely while the initial scaling batch is still initializing.

Key Concept

Optimizing write storage I/O using Provisioned IOPS and managing EC2 Auto Scaling behavior via warm pools and appropriate cooldown thresholds to match instance bootstrap times.
Rate this question