In the Starting multiple instances as part of a replica set recipe in Chapter 1, Installing and Starting the MongoDB Server, we saw how to set up a simple replica set and what the purpose of a replica set is. We also have a good deal of explanation in Appendix, Concepts for Reference, on what write concern is and why it is used. What we saw about write concerns is that they offer a minimum level guarantee for a certain write operation. However, with the concept of tags and write concerns, we can define a variety of rules and conditions that must be satisfied before a write operation is deemed successful and a response is sent to the user.
Consider some common use cases: