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 , 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 seconds of replication lag. Which of the following solutions is the most effective way to optimize the performance of this database tier?
- 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
- BEnable 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.
- CContact 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.
- DModify the EC2 Auto Scaling group configuration to reduce the cooldown period to 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
Anahtar Kavram
Scaling read capacity with RDS Read Replicas and optimizing storage I/O using gp3 storage volumes.