Azure Cosmos DB

Overview

  • General purpose NoSQL Managed Database that is globally distributed

  • 4 types:

    • Documents

    • Key-Value

    • Column-Family

    • Graph

Choosing the right API

  • SQL API: Native, stores documents, and uses SQL API

  • MongoBD API: stores documents, and use MongoDB API

  • Cassandra API: stores column oriented data, and uses Cassandra API

  • Gremlin API: stores graph format data (as edges), and use Gremlin API

  • Table API: store key-value pair data, and uses storage table API

Consistency Levels

  • Strong consistency: guarantees consistency as the data is replicated synchronously to replicas

  • Bounded staleness: Read might lag behind write (you define the lag)

  • Session consistency: a writer is always guaranteed to read the same data that they wrote, and will never read a stale version from an out-of-date replica - while everyone else may experience dirty reads

  • Consistent prefix: guarantees that reads never see out-of-order writes

Reference

  • Consistency levels in Azure Cosmos DB: https://learn.microsoft.com/en-us/azure/cosmos-db/consistency-levels

Last updated