Question

Difficulty: HardDatabase High Availability

A financial transaction application uses a Multi-AZ Amazon RDS for PostgreSQL DB instance. Following an unplanned failover event, logs indicate that the database successfully transitioned to the standby instance within 40 seconds. However, the application server pool was unable to reconnect to the database for over five minutes, resulting in dropped client requests. A SysOps Administrator discovers that the application servers continued resolving the RDS endpoint to the IP address of the failed primary instance.

Which combination of actions should the SysOps Administrator take to resolve this issue and minimize failover recovery time? (Select TWO.)

  1. Deploy Amazon RDS Proxy between the application servers and the database instance, and update the application to connect to the proxy endpoint.Answer
  2. Reduce the DNS caching Time to Live (TTL) value in the application server's Java Virtual Machine (JVM) configuration settings.Answer
  3. C
    Promote an existing Amazon RDS Read Replica to primary by using an AWS Lambda function triggered by an Amazon EventBridge database event.
  4. D
    Configure an Amazon Route 53 Active-Passive failover routing policy mapped directly to the private IP addresses of the primary and standby database instances.
  5. E
    Create an Amazon Route 53 CNAME record pointing to the RDS Multi-AZ secondary endpoint, and associate it with a Route 53 health check.

Answer

Deploying Amazon RDS Proxy between the application and the database instance, and reducing the DNS caching Time to Live (TTL) value in the application server's JVM configuration settings.
Deploying Amazon RDS Proxy allows the application to remain connected to the proxy endpoint while the proxy handles the backend failover to the promoted standby instance transparently. Additionally, reducing the JVM DNS caching TTL forces the application servers to discard cached IP records and query DNS again, enabling them to discover the new CNAME target quickly.

Step-by-Step Solution

1
Analyze failover behavior and DNS resolution caching.
The application server continues to connect to the cached IP address of the failed primary instance instead of performing a new DNS lookup for the updated CNAME.
Identify why the application server experienced a prolonged outage despite a successful database-level failover.
2
Configure the JVM DNS cache TTL.
The JVM DNS cache TTL is lowered (e.g., to 30 seconds), forcing the application server to query the DNS name server again shortly after the failover.
Ensure the application server resolves the new IP address of the promoted standby instance once the RDS CNAME record is updated.
3
Implement Amazon RDS Proxy.
Active application connections are preserved by the proxy during failover, and queries are automatically routed to the new primary database instance.
Provide connection pooling and abstract the failover process from the application layer to minimize client reconnection delays.

Key Concept

RDS Multi-AZ failovers update the CNAME record of the database endpoint. Applications must either bypass DNS lookup delays using a proxy (like Amazon RDS Proxy) or configure their client-side DNS caching (like JVM TTL) to expire stale records quickly.
Rate this question