- Newest
- Most votes
- Most comments
To test RDS Multi-AZ failover with your Node.js app:
-
Monitor DNS: The RDS endpoint DNS remains the same during failover, but the underlying IP address changes. Use the DNS name to connect, not the IP.
-
Failover Impact: During failover, the RDS instance switches to the standby, and you may experience a brief downtime (usually under a minute).
-
Check IP After Failover: After failover, check the new IP using your existing code. The IP address should change, while the port might also vary.
Failover will cause minimal downtime, but ensure you reconnect after failover to see the updated IP.
Hello.
This is not an answer to failover testing with Node.js, but it will answer things like downtime during failover.
When a failover occurs in RDS, the IP address of RDS should change as it switches to the standby instance.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html#USER_VPC.Subnets
When Amazon RDS creates a DB instance in a VPC, it assigns a network interface to your DB instance by using an IP address from your DB subnet group. However, we strongly recommend that you use the Domain Name System (DNS) name to connect to your DB instance. We recommend this because the underlying IP address changes during failover.
Additionally, there will be downtime during failover.
Normally, failover will be completed within a minute and you will be able to connect.
Therefore, if the IP address does not seem to have changed when connecting from Node.js, I think it is because you are connecting to the instance that was originally running as the primary instance during failover.
https://repost.aws/knowledge-center/rds-mysql-downtime-impact
Relevant content
- asked a year ago
- asked a year ago
- AWS OFFICIALUpdated 3 years ago
So, whether the IP address changes on RDS during a reboot depends on the RDS itself? Does that mean there's a possibility that when I test by rebooting the RDS, I might connect to the same instance again, which is why the IP address doesn't change ? Thanks for the answer.