Monday 10 April 2017

Multiple sequelize connections (differents dbs)

I have some doubts about good practices to do multiple connections on sequelize. Different that others questions with same title, i'm not trying to do just 2 or 3 connections in my app and set 2 or 3 variables, each one with a connection.

I want a way to do 500 or more connections dynamically, e.g.: the main connection is on a default PostgreSQL database, where user do the authentication. After this, is redirected to another database (always Postgre) that contains their data to use the application. My problem is that each user has this flow (default -> own database) and if I set some variables to each one in the app, this could be dangerous to the performance of the app. I'm trying to find other better ways to do that.

Thanks in advance.



via Ricardo Swarovsky

No comments:

Post a Comment