You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to connect Sequelize to Amazon RDS correctly #6932
I'm using an Amazon RDS hosted MySQL with Multi-AZ Support. Just could not find any information on how to connect to Amazon RDS probably so that Sequelize is handling fail-overs accordingly?
I'm just using the following config, but do not now if this is enough?
@manuelfink Whenever possible, you should avoid hard-coding IP addresses into your configuration since that can make it fragile when your server IP address changes. Instead, using a DNS/domain name can make it a bit more resilient (e.g. db1.domain.com instead of 123.456.7890).
Managing failovers also isn't something that should be handled by Sequelize or in your code. If you're using AWS RDS, you can use automatic failovers, which can change the DNS record of the DB instance to point to the standby DB instance if it goes down. Alternatively, you could probably handle this yourself with a new EC2 instance with a load balancer (e.g. Nginx/HaProxy) and use service discovery (e.g. Consul) to manage a dynamic inventory of your healthy hosts. I haven't done this with Amazon RDS, but it should work.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, just leave a comment 🙂
Activity
anonmily commentedon Dec 1, 2016
@manuelfink Whenever possible, you should avoid hard-coding IP addresses into your configuration since that can make it fragile when your server IP address changes. Instead, using a DNS/domain name can make it a bit more resilient (e.g. db1.domain.com instead of 123.456.7890).
Managing failovers also isn't something that should be handled by Sequelize or in your code. If you're using AWS RDS, you can use automatic failovers, which can change the DNS record of the DB instance to point to the standby DB instance if it goes down. Alternatively, you could probably handle this yourself with a new EC2 instance with a load balancer (e.g. Nginx/HaProxy) and use service discovery (e.g. Consul) to manage a dynamic inventory of your healthy hosts. I haven't done this with Amazon RDS, but it should work.
Resources:
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.MultiAZ.html
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ConnectToInstance.html
https://www.consul.io/intro/index.html
stale commentedon Jun 29, 2017
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, just leave a comment 🙂