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
Post a Comment