O'Reilly logo

Learning Azure DocumentDB by Riccardo Becker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required