MongoDB Documentation, Release 3.0.4 db.mycollection.find( { x : 123 } ) By Default, Updates Affect one Document To update multiple documents that meet your query criteria, set the update multi option to true or 1 . See: Update Multiple Documents (page 76). Prior to MongoDB 2.2, you would specify the upsert and multi options in the update method as positional boolean options. See: the update method reference documentation. BSON Document Size Limit The BSON Document Size limit is currently set at 16MB per document. If you require larger documents, use GridFS (page 150). No Fully Generalized Transactions MongoDB does not have fully generalized transactions (page 80). If you model your data using rich documents that closely resemble your application’s objects, each logical object will be in one MongoDB document. MongoDB allows you to modify a document in a single atomic operation. These kinds of data modification pattern covers most common uses of transactions in other systems. Use an Odd Number of Replica Set Members Replica sets (page 559) perform consensus elections. To ensure that elections will proceed successfully, either use an odd number of members, typically three, or else use an arbiter to ensure an odd number of votes. Keep Replica Set Members Up-to-Date MongoDB replica sets support automatic failover (page 580). It is impor- tant for your secondaries to be up-to-date. There are various strategies for assessing consistency: See also: replica set rollbacks (page 584). General Considerations Replica Set Considerations 1. Use monitoring tools to alert you to lag events. See Monitoring for MongoDB (page 187) for a detailed discus- sion of MongoDB’s monitoring options. 2. Specify appropriate write concern. 3. If your application requires manual fail over, you can configure your secondaries as priority 0 (page 567). Priority 0 secondaries require manual action for a failover. This may be practical for a small replica set, but large deployments should fail over automatically. Sharding Considerations • Pick your shard keys carefully. You cannot choose a new shard key for a collection that is already sharded. • Shard key values are immutable. • When enabling sharding on an existing collection , MongoDB imposes a maximum size on those col- lections to ensure that it is possible to create chunks. For a detailed explanation of this limit, see: <sharding-existing-collection-data-size> . To shard large amounts of data, create a new empty sharded collection, and ingest the data from the source collection using an application level import operation. 5.1. Administration Concepts 219