DOP-C02 Resilient Cloud Solutions Practice Question
A company runs a critical e-commerce platform on AWS. The architecture includes an Application Load Balancer (ALB) that distributes traffic to a fleet of EC2 instances in an Auto Scaling group across three Availability Zones. The instances run a Java application that connects to an Amazon RDS Multi-AZ MySQL database. The application also uses Amazon ElastiCache for Redis for session caching. The company recently experienced a severe outage where the ALB's 5xx error rate spiked to 100% for 45 minutes. The root cause was a combination of a slow-running query on the RDS primary instance and a subsequent failover that caused the application to lose connections to the database. The failover happened because the slow query caused the primary to become unresponsive, triggering a Multi-AZ failover. During the failover, the application's connection pool exhausted, and new connections failed. The application logs show a high rate of 'java.sql.SQLTimeoutException' and 'com.mysql.cj.exceptions.CJCommunicationsException'. The DevOps team needs to implement a long-term solution that minimizes the impact of similar incidents. The solution must be cost-effective and require minimal application changes. Which combination of actions should the DevOps team take?
⚠ Common exam trap
The trap here is that candidates often focus on scaling the database (e.g., increasing instance size or adding read replicas) to fix performance issues, but overlook the critical connection management problem that causes application-level timeouts during failover, which RDS Proxy directly addresses.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Implement Amazon RDS Proxy to manage database connections and add read replicas to offload read traffic.
Amazon RDS Proxy is the correct solution because it efficiently manages database connection pooling, reducing the likelihood of connection exhaustion during failovers. By maintaining a warm connection pool and automatically reconnecting to the new primary after a Multi-AZ failover, RDS Proxy minimizes application-side connection timeouts and errors like SQLTimeoutException and CJCommunicationsException. Adding read replicas offloads read traffic, reducing the load on the primary and mitigating the risk of slow queries causing unresponsiveness. This combination requires minimal application changes and is cost-effective compared to scaling the primary instance.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Implement Amazon RDS Proxy to manage database connections and add read replicas to offload read traffic.
Why this is correct
Amazon RDS Proxy sits between the application and the database, maintaining a warm connection pool that absorbs the spike in connection requests when EC2 instances reconnect during a failover. Because the proxy keeps connections to the RDS instance open and multiplexes client sessions, the primary no longer gets overwhelmed by thousands of short-lived connections. Adding read replicas moves read-heavy queries off the primary, reducing CPU/IO contention that can cause slow queries and cascading failovers. This directly addresses the root cause of connection exhaustion while preserving write consistency on the primary.
- ✗
Use an Auto Scaling policy for EC2 based on RDS connection count and implement a read replica for the primary.
Why it's wrong here
Scaling EC2 instances based on RDS connection count is problematic because the metric reflects total database sessions, not a per-instance threshold, and adding more app servers without connection pooling simply opens more connections to the same primary, worsening the very problem. While adding a read replica can offload SELECT queries, it does nothing to protect the primary from connection storms during failover, because read replicas cannot serve write traffic or reduce the number of connections required by the application. This approach treats the symptom (load) rather than the structural issue (connection management).
- ✗
Configure Multi-AZ RDS with a synchronous standby and use Amazon RDS for MySQL with enhanced monitoring.
Why it's wrong here
Multi-AZ RDS already provisions a synchronous standby replica and automatic failover, so configuring it again does not change the connection behavior that causes the outage. Enhanced monitoring provides OS-level metrics like memory, CPU, and disk utilization to help diagnose bottlenecks, but it is a visibility tool, not a control-plane solution for connection exhaustion. The failure mode here is too many connections to the primary, not a lack of high availability or insufficient observability.
- ✗
Increase the instance size of the RDS primary and enable Performance Insights to identify slow queries.
Why it's wrong here
Scaling up the primary instance adds CPU, memory, and I/O capacity, but connection exhaustion is constrained by the max_connections parameter and per-connection memory overhead, not just raw instance size; under a connection storm, a larger instance may still run out of connection slots or thread capacity. Performance Insights can expose slow queries and locking, which helps after-the-fact tuning, but it cannot prevent the app from opening thousands of connections during failover. This reactive, expensive approach does not implement connection pooling or reduce read traffic, so the original trigger remains.
Go deeper
Related to this question
About these practice questions
This DOP-C02 question is part of Courseiva's 1,013-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DOP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DOP-C02 exam.