You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.9 KiB
57 lines
1.9 KiB
= Mongo -> services mongo
|
|
|
|
|
|
*MongoDB* is a document database with the scalability and flexibility that you want with the querying and indexing that you need
|
|
|
|
Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas.
|
|
MongoDB is developed by MongoDB Inc. and licensed under the Server Side Public License (SSPL).
|
|
|
|
|
|
== Main features
|
|
|
|
* Ad-hoc queries
|
|
|
|
** MongoDB supports field, range query, and regular-expression searches.
|
|
|
|
* Indexing
|
|
|
|
** Fields in a MongoDB document can be indexed with primary and secondary indices or index.
|
|
|
|
* Replication
|
|
|
|
** MongoDB provides high availability with replica sets.
|
|
|
|
* Load balancing
|
|
|
|
** MongoDB scales horizontally using sharding.
|
|
|
|
* File storage
|
|
|
|
** MongoDB can be used as a file system, called GridFS, with load balancing and data replication features over multiple machines for storing files.
|
|
|
|
* Aggregation
|
|
|
|
** MongoDB provides three ways to perform aggregation: the aggregation pipeline, the map-reduce function, and single-purpose aggregation methods.
|
|
|
|
** Map-reduce can be used for batch processing of data and aggregation operations.
|
|
|
|
* Server-side JavaScript execution
|
|
|
|
** JavaScript can be used in queries, aggregation functions (such as MapReduce), and sent directly to the database to be executed.
|
|
|
|
* Capped collections
|
|
|
|
** MongoDB supports fixed-size collections called capped collections. This type of collection maintains insertion order and, once the specified size has been reached, behaves like a circular queue.
|
|
|
|
Doc origin https://en.wikipedia.org/wiki/MongoDB#Main_features[wikipedia]
|
|
|
|
|
|
|
|
== Replication in MongoDB
|
|
|
|
A replica set is a group of mongod instances that maintain the same data set. A replica set contains several data bearing nodes and optionally one arbiter node.
|
|
|
|
|
|
image::ROOT:replica-set-primary-with-two-secondaries.bakedsvg.svg[float=right]
|
|
|
|
TIP: http://docs.swarmlab.io/SwarmLab-HowTos/swarmlab/docs/swarmlab/docs/hybrid/start-storage.html[swarmlab provide storage options^]
|
|
|