Soru

Zorluk: OrtaDatabase High Availability

An Amazon RDS for PostgreSQL DB instance configured in a Multi-AZ deployment undergoes an automated failover during a maintenance window. Following the failover event, a Java-based application server experiencing high traffic is unable to reconnect to the database for several minutes, whereas other client services reconnect almost immediately. Which actions should a SysOps Administrator take to resolve this issue and minimize connection downtime during future failovers? (Select TWO.)

  1. Modify the Java Virtual Machine (JVM) configuration on the application server to set the DNS time-to-live (TTL) to a low value, such as 30 seconds.Cevap
  2. Ensure that the application server is configured to connect to the database using the Amazon RDS DB instance endpoint DNS name rather than a resolved IP address.Cevap
  3. C
    Manually promote an Amazon RDS read replica in the standby Availability Zone to restore database write capabilities.
  4. D
    Configure an Amazon Route 53 Active-Passive failover routing policy with health checks pointing to the private IP addresses of the primary and standby RDS instances.
  5. E
    Convert the Amazon RDS DB instance to a Single-AZ deployment and configure an Amazon Route 53 CNAME record pointing to the database.

Cevap

To resolve the connection issues, the SysOps Administrator should modify the Java Virtual Machine (JVM) configuration on the application server to set the DNS time-to-live (TTL) to a low value, and ensure the application server connects using the Amazon RDS DB instance endpoint DNS name instead of a resolved IP address.
The correct actions are to adjust the DNS caching behavior of the application client (specifically the JVM TTL settings) and to ensure that the client connects using the RDS DB instance endpoint. Amazon RDS Multi-AZ failovers work by modifying the DNS record of the database endpoint to point to the newly promoted standby instance. If an application caches the DNS resolution indefinitely or connects using the direct IP address of the old primary instance, it will fail to connect after a failover occurs, even if the database is available.

Adım Adım Çözüm

1
Verify the database client connection configuration.
Confirm that the application connects using the Amazon RDS DB instance endpoint DNS name instead of a static IP address.
Using the endpoint DNS name is critical because RDS changes this DNS record during failover to point to the standby instance.
2
Examine DNS caching behavior on the application host.
Check if the client runtime environment (such as Java Virtual Machine) is caching DNS resolutions indefinitely.
By default, the JVM caches DNS lookups forever unless configured otherwise, which prevents it from picking up the updated DNS record after RDS fails over.
3
Configure JVM networkaddress.cache.ttl to a low value.
The application server will refresh its DNS cache periodically and resolve the new IP address of the promoted standby instance within seconds.
Setting a low TTL (e.g., 30 seconds) ensures the application quickly recovers from database failovers without manual intervention or restarts.

Anahtar Kavram

Amazon RDS Multi-AZ deployments use DNS endpoint modification to automate failovers. Application clients must connect using this DNS endpoint and configure client-side DNS caching (TTL) properly to ensure fast reconnection to the newly promoted standby database.
Bu soruyu puanla