MongoDB Write Concern
Clients issue write operations with some level of write concern, which describes the level of concern or guarantee the server will provide in its response to a write operation.
Available levels are:
Errors ignored: can be very efficient, but it's really too unsafe for normal operations.
Unacknowledged: errors are handled, but MongoDB will still not acknowledge the receipt of write operations.
Acknowledged: waits until mongod confirms the receipt of the write operation. With this level of write concern, clients can catch network, duplicate key, and other exceptions.
Journaled: the mongod instance will confirm the write operation only after it's been written to the journal. This ensures durability in case of a single instance database.
Replica Acknowledged: the write concern for replica sets has additional parameters. Most important, it allows to wait for a given number of members to give the receipt of a write before acknowledging to the client. Setting this to the special value majority avoids most rollback situations.
Additionally, you can (and should) set a timeout for acknowledged levels.












