mongodb-balancer

1.2.3 • Public • Published

MongoDB balancer library

This library allows you to operate data in many mongodb hosts as in one.

THIS LIBRARY DON'T SYNCING DATA BETWEEN HOSTS!

Instead of this, mongodb-balancer operating many clusters as chunks of one cluster. E.g when you do "insert" command, library is selection least loaded cluster, and inserts data in this cluster.

That can help you to split your data into many servers, instead of buying good server with hard disk, full of terabytes of data.

How to use it!?

You can use it as native mongodb library! But here's some changes you need to remember:

  • For connecting to multiple hosts you need to use mongodb.connectMultiple instead of mongodb.connect. As first argument it takes array of mongodb uris, as second - mongodb connection options (like in native driver).
  • collection.find function not returns mongodb.Cursor object, instead of that it returns processed array of results (like as after Cursor.toArray() in native node driver).

Enjoy your hundreds of hosts!..

Readme

Keywords

none

Package Sidebar

Install

npm i mongodb-balancer

Weekly Downloads

0

Version

1.2.3

License

ISC

Unpacked Size

7.6 kB

Total Files

9

Last publish

Collaborators

  • miceve