This entity allows MongoDB instances to be started and managed by Brooklyn.
You can add a MongoDB entity with this code: (Groovy)
mongodb = new MongoDbServer(owner: myApplication);
The entity supports the following configuration keys:
Note that several configuration parameters are reserved. If you supply a CONFIG_URL that attempts to set any of these parameters, they will be ignored.
The following areas are suggested for further development:
MongoDB has several statistics available through its programmatic API (visible in a similar way to documents). These could potentially be used to expose health data as Brooklyn sensors.
See http://docs.mongodb.org/manual/administration/monitoring/#statistics
MongoDB supports a replication system. This allows up to 12 MongoDB instances to be started and brought together as a replication set. One node becomes the primary and will service write requests, replicating to other nodes (“secondaries”) in the set. Reads can be serviced by any node.
Replication provides extra resilience, as the secondaries will monitor the health of the primary, and in the event of its failure, one of the secondaries will be promoted to primary.
It also has the potential to act as a performance tool for heavy read scenarios, as reads can be directed to any node.
It has an analog in multiple web application servers with a load-balancer node in front - a cluster controller will be required to expose effectors that control the size of the cluster, and sensors that aggregate the individual MongoDB sensors. It differs from the web tier example by not needing a load balancer - MongoDB manages this itself.
See http://docs.mongodb.org/manual/core/replication/
Sharding distributes data between multiple nodes, each node responsible for a specific subset of the data. The allows MongoDB to scale up to handle large quantities of data that a single node could not handle on its own. It also improves performance in workloads involving many writes, as the write operations will be spread across multiple nodes (subject to the data being written being fairly evenly distributed across nodes).