node.js - One Node Restful service that connects to thousands of Mongo Databases? -


i'm developing restful service application uses mongodb , need service change connected mongo database based on parameter. expect need large number of databases. maybe thousands.. tried use mongoose allows 1 connection. best way approach problem?

ok, it's reasonable organize site in multiple databases rather object type in multiple collections, suppose. drivers should able handle multiple databases making multiple connection/client objects, or working through 1 connection talking multiple databases. mongoose doesn't talk more 1 database 1 connection, can create multiple connections. see "multiple connections" section in docs. also, if have squillions of databases, read on namespace size limits


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -