RDS Listener resolves 2 IP addresses

0

Hello. I'm using RDS with SQL Server Enterprise in HA and a CNAME register in Route 53 to point to the listener, however the CNAME was resolving only the primary node and last night I changed it for the listener Alias. The problem was in my app because every 300 sec the app showed a time out and it couldn't find the Database. I had to do a rollback for it.

Today I was trying to understand what was the problem but I saw something else. The RDS listener was resolving both IP addresses (primary and secondary node) is it normal? or might I am missing something, because I did a lab without DNS and was the same result every 300 seconds the communication was lost.

Could you help me please?

1 Answer
2
Accepted Answer

🚨 The timeouts you experienced every 300 seconds could be related to your application's connection handling, or possibly some other configuration or infrastructure issue. 🤯 It's difficult to pinpoint the exact cause without more information about your application, infrastructure, and connection settings.


It is normal for the RDS listener to resolve to two IP addresses when you have configured a highly available (HA) SQL Server DB cluster. The RDS listener is designed to provide a single, reliable endpoint that can transparently fail over between the primary and secondary database instances in the HA setup.

💡 When your application connects to the RDS listener, it may initially connect to the primary node. However, if the primary instance becomes unavailable for any reason (e.g., maintenance, failover, etc.), the RDS listener will transparently redirect the connection to the secondary instance. This failover process can take up to 60-120 seconds, during which time your application may experience timeouts.

To handle the potential failover scenarios gracefully, your application should be designed to:

  1. Retry connections automatically if it encounters a timeout or connection error.
  2. Implement appropriate connection pooling and retries to mitigate the impact of failover events.
  3. Use connection strings that reference the RDS listener endpoint, rather than hard-coding the primary instance address.
profile picture
EXPERT
answered 14 days ago
profile picture
EXPERT
reviewed 13 days ago
profile picture
EXPERT
reviewed 14 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions