I'm using an Amazon RDS hosted MySQL with Multi-AZ Support. Just could not find any information on how to connect Sequelize to Amazon RDS properly so that Sequelize is handling fail-overs etc. accordingly?
I'm just using the following config, but do not know if this is enough or recommended?
sequelizeConfig = {
logging: false,
pool: { maxConnections: 5, maxIdleTime: 30},
sequelizeConfig[dialectOptions] = {
ssl: 'Amazon RDS'
}
}
Using Amazon RDS with Multi-AZ I consider the following is important:
- Try reconnecting if connection got lost, until it is available again
- Don't cache mysql server ip address too long (Amazon suggests less than 1 min)
Amazon Docs are not writing anything about connection handling and pooling.