Is MongoDB eventual Consistent ?

83 views
Skip to first unread message

eChuang Chew

unread,
May 27, 2018, 8:34:31 AM5/27/18
to mongodb-user
Hi Everyone,

I like to know is MongoDB eventual consistent if i have only 1 node no clustering a very simple and basic production environment.

Let me introduce about my use case before you guys answering the question. I am actually decide using MongoDB in a banking-like application which required storing user's credit transfer transaction. 
Because the importance of credit transfer record, I want to ensure everytime transaction is done, means the record has been persisted into a permanent storage. Why I choose MongoDB over other is because the schema-less support which is very preferable for the application behavior.

Your advise and feedback is highly appreciated, thank you very much.

Kevin Adistambha

unread,
Jun 4, 2018, 2:41:27 AM6/4/18
to mongodb-user

Hi

For MongoDB’s consistency model, please see Read Isolation, Consistency, and Recency and the MongoDB FAQ.

I want to ensure everytime transaction is done, means the record has been persisted into a permanent storage

I think you’re describing write concern, which is the level of acknowledgement requested from MongoDB for write operations to a standalone mongod or to replica sets or to sharded clusters. For a replica set and the use case you described, you want the write concern setting of “majority”. Please note that for production deployments, it is strongly recommended to use a replica set of at least 3 data-bearing nodes. The production notes also contains recommended production settings for MongoDB.

Best regards
Kevin

Message has been deleted

eChuang Chew

unread,
Jun 13, 2018, 1:15:59 AM6/13/18
to mongod...@googlegroups.com
Hi Kevin,

Thanks for the explanation. I think i get the definition of eventual consistency wrong at the beginning. That should be referring to the consistency between replica perhaps for the read operation.

Yes, the write operation is what i concern on. Beside, I found a configuration in MongoDB which might be something similar to what i looking for; #storage.journal.commitIntervalMs I not too sure is this the 1 to determine the actual write to a permanent storage. Correct me if i'm wrong.

Also, thanks for your recommendation of using replica set in production environment. I will consider that as well. 

--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/0f52280e-0459-4149-b63c-7bace2e2a848%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Best Regards,
eChuang
Reply all
Reply to author
Forward
0 new messages