It sounds like you need to look at
Write Concern in MongoDB. This is basically a setting that decides when/if MongoDB confirms that a document has been written successfully or how it reports any errors. MongoDB is designed to support robust horizontal scaling across multiple machines via sharding and replication, and data gets written first to memory, then to the actual database and replicas. There are different levels of write concern depending on how much of a guarantee you want that your data has definitely been written to the database and replicated across all servers, so you would choose the write concern that suits your application's requirements. The default is
Acknowledged.
One common practice on a replicated cluster is to write to one machine (the master) but read from several replicated workers, so it may take a few moments before your workers receive the latest update from the master, for example. A very strict write concern may influence application performance on a replicated cluster, because your application may have to wait for all replicated nodes to respond before it can continue after the write operation. This might be a reason to explore asynchronous processing, for example.