Setting consistency levels
DocumentDB offers different levels of consistency. Again, this is a matter of balancing between performance, consistency, and latency. DocumentDB offers four levels of consistency, each with its own characteristics.
Consistency levels can only be set on user defined resources such as documents and triggers. By default, all system resources such as databases and collections are strongly consistency enabled. The following types of consistency levels are available:
Strong
Bounded staleness
Session
Eventual
Setting the consistency level can be accomplished using the designated SDKs or the Azure portal, as shown in the following screenshot:
Using strong consistency
Strong consistency means that a write to a collection, database, or some other user defined resource is visible only after it is committed by the majority of the replicas. This means that a client cannot face an uncommitted write and DocumentDB always guarantees to return the latest write that was successful.
This...