title: How to connect Node Sequelize to Amazon RDS MySQL with Multi-AZ probably
body: <p>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?</p>
  
  <p>I'm just using the following config, but do not know if this is enough or recommended?</p>
  
  <pre><code>sequelizeConfig = {
    logging: false,
    pool: { maxConnections: 5, maxIdleTime: 30},
    sequelizeConfig[dialectOptions] = {
      ssl: 'Amazon RDS'
    }
  }
  </code></pre>
  
  <p>Using Amazon RDS with Multi-AZ I consider the following is important:</p>
  
  <ol>
  <li>Try reconnecting if connection got lost, until it is available again</li>
  <li>Don't cache mysql server ip address too long (Amazon suggests less than 1 min)</li>
  </ol>
  
  <p><a href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs.rds.html#create_deploy_nodejs.rds.newDB" rel="noreferrer">Amazon Docs</a> are not writing anything about connection handling and pooling.</p>