Me and my colleges are having second thoughts on using MongoDB to store al the data for our application. Some think that because of Mongo’s eventual consistency when user register or updates his profile (or something similar but more important) the result won’t be seen immediately and could frustrate users.
I’m pretty sure unless we have a ton of data and we do some replication we won’t see the effects of eventual consistency. But I’m not sure.
Any advice? Use only mongo or add an additional SQL server for storing sensitive data?
MongoDB is not eventually consistent, but it has asynchronous replication. You can avoid the risk of reading an old value by not reading from slaves (a simple connection flag), or writing wit a flag that waits for the replication to have finished before returning. Look atthedocumentation gor the getLastError command for all the details on the latter.
Using MongoDB forwhat you’re describing is fine.