This section describes the master-slave architectureMaster-Slave architecture--deprecated, recommended for use with replica setsThe master-slave configuration can be configured in the configuration fileFrom node can use command to append master node
MapReduceMapreduce: The set of targets to manipulateMap : Map function (generate key-value pair sequence as reduce function parameter)//incoming group key and value to be countedReduce: Statistical functions//Format the returned Parameter
1, Mongod startup item Comment (default cannot generate path, need to establish manually) dbpath the path to the DB instance logpath Logging path logappend log in append form, default to overwrite bind_ip instance binding IP address port instance
What is node. js? node. JS is a JAVASCRIPT runtime environment based on the Chrome V8 engine. node. JS uses an event-driven, non-blocking I/O model to make it lightweight and efficient. node. JS is developed by C + + and is actually a JS runtime
Recently consider migrating order history data from Oracle database to NoSQL database for historical data query and analysis, one day tens data. Intended to use the MongoDB database. Use Nodejs to do the query and Statistics API, the demand for
The another tool is mentioned in this blog, namely Mongodump and Mongorestore.General speaking, it's very useful to back up or to restore the data of the database or collection by means of Mongodump and M Ongorestore. In the next time, we'll make
MongoDB IndexPS: About half a month the wood has been updated because of the previous phase of the business trip and these days suddenly come to the project. Causes the net time to reduce sharply, really is sorry, later anticipates will be
We left a few questions in the last chapter.
1 whether the primary node can actively switch connections on its own ?
Need to switch manually now
2 master node read and write pressure too big how to solve
3 each of the above data from the
I. GENERAL Enquiry1.1. View all the documents in the collectionCommand: DB. Collection name. Find ();650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/96/C3/wKioL1klMluQ-3MuAAAXdHmOllE584.jpg "title=" 1495609994 (1). jpg "alt="
1.MongoDB operations commands for common operations 1.1 databases1. Create the database and use the command with the database name , such as using SXF.* Note: 1.the name of the database followed by the use command, if present, is entered into this
With multi-threading, the biggest problem is Redis and MongoDB's dirty data problem1, Upsert's dirty data problemMultithreading to the same collect Upsert operation, will raise the concurrency of dirty data problems, the first solution is to use the
In the shell, look at the index that already exists in the collection, and you can run:Db.things.getIndexes ()To view all indexes in a database, you can run:Db.system.indexes.find ()Create an indexDb.things.ensureIndex ({j:1});Build OptionsThe
First step: Select the installation pathStep two: Download, unzip, rename wget https://fastdl.mongodb.org/linux/mongodb-linux-i686-2.6.7.tgz TAR-ZXVF mongodb-linux-i686-2.6.7.tgz MV mongodb-linux-i686-2.6.7 MongoDB Step three: Enter the bin
Enable text Search:The initial text search is an experimental feature, but the 2.6 version starts with the configuration enabled by default. However, if you are using a previous MongoDB version, you must enable text search, using the following code:>
Recently work needs, to use MongoDB, this is the use of pecl installed, with the standard MONGO use or there is a difference, here does not tell the difference, only two more typical questions to how to deal with, specific documents you can directly
1. Storage typeThe MongoDB document is similar to JSON. But not completely JSON. There are only six types of JSON: null. bool Number, String. Array. Object.However, MONGO's documentation extends several types on the basis of JSON. For example, a
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.