Soru

Zorluk: OrtaOptimizing Compute and Storage Performance

An enterprise e-commerce application runs on a fleet of Amazon EC2 instances in an Auto Scaling group behind an Application Load Balancer. The application utilizes a Multi-AZ Amazon RDS for PostgreSQL database for transactional data. During a flash sale event, users experience slow page load times. Monitoring tools show that EC2 CPU utilization remains under 40%40\%, but the RDS database experiences high read latency and the read I/O operations per second (IOPS) capacity is exhausted. The read queries are non-blocking and can tolerate up to 1010 seconds of replication lag. Which of the following solutions is the most effective way to optimize the performance of this database tier?

  1. Deploy Amazon RDS PostgreSQL Read Replicas, configure the application to route read queries to the replica endpoints, and upgrade the primary database storage from gp2 to gp3 with higher provisioned IOPS.Cevap
  2. B
    Enable read access on the existing Multi-AZ standby instance, and configure the application to distribute read queries between the primary DB instance and the standby DB instance.
  3. C
    Contact AWS Support to pre-warm the Application Load Balancer to handle the peak request rate, and configure the database connection pool on the EC2 instances to use a larger maximum connection limit.
  4. D
    Modify the EC2 Auto Scaling group configuration to reduce the cooldown period to 1010 seconds, allowing the EC2 instances to scale out rapidly and distribute the database query load across more nodes.

Cevap

Deploy Amazon RDS PostgreSQL Read Replicas, configure the application to route read queries to the replica endpoints, and upgrade the primary database storage from gp2 to gp3 with higher provisioned IOPS.
The correct solution optimizes the database performance by utilizing Read Replicas to offload read queries, which is viable due to the application's tolerance for replication lag. Additionally, upgrading the database storage to gp3 enables provisioning higher IOPS independently of storage size, resolving the database storage I/O bottleneck.

Adım Adım Çözüm

1
Analyze the metrics and identify the bottleneck.
EC2 CPU is low (under 40%40\%), but the database tier is experiencing read I/O exhaustion and high latency.
This determines that the optimization efforts must target the database storage and read capability rather than the compute scaling of the web tier.
2
Select the correct mechanism for scaling database reads.
Determine that Amazon RDS Read Replicas are needed to handle read query routing since the application can tolerate replication lag.
Standard RDS Multi-AZ standby instances cannot serve read traffic, making read replicas the correct approach for horizontal scaling.
3
Optimize database storage I/O performance.
Upgrade the primary database storage to gp3 and provision higher IOPS.
gp3 volumes allow independent scaling of IOPS and throughput, removing the I/O capacity bottleneck cost-effectively.

Anahtar Kavram

Scaling read capacity with RDS Read Replicas and optimizing storage I/O using gp3 storage volumes.
Bu soruyu puanla