Please enable JavaScript.
Coggle requires JavaScript to display documents.
7 cosmos db global - Coggle Diagram
7 cosmos db global
consistency level
-
-
- Strong Linearizability. Reads are guaranteed to return the most recent version of an item.
- Bounded Staleness Consistent Prefix. Reads lag behind writes by at most k prefixes or t interval.
- Session Consistent Prefix. Monotonic reads, monotonic writes, read-your-writes, write-follows-reads.
- Consistent Prefix Updates returned are some prefix of all the updates, with no gaps.
- Eventual Out of order reads.
-
- reads guaranteed to return the most recent version of an item
- write is only visible after it is committed durably by the majority quorum of replicas
- no low latency, high write availability
- bounded staleness consistency
- reads may lag behind writes by at most K versions or prefixes of an item or t time-interval
- 99.99% availability and low latency
- scoped to a client session
- monotonic reads, monotonic writes, and read your own writes (RYW) guarantees
- predictable consistency for a session
- maximum read throughput
- lowest latency writes and reads
- Consistent prefix consistency
- guarantees that in absence of any further writes, the replicas within the group eventually converge
- reads never see out of order writes
-
multi-master support
- active - active
- account is replicated in multiple regions
- each region is a master region that equally participates in a write-anywhere model
-
benefits
- latency
- 99.999% availability
- unlimited write scalability and troughput
- built in conflict resolution
Conflict resolution
item is simultaneously changed in multiple regions
before propagation between the regions has happened
RARE
- Last-Writer-Wins (LWW): default
- Custom - User-defined function
If the User-defined function fails or does not exist, Azure Cosmos DB will add all conflicts into the read-only conflicts feed they can be processed asynchronously
- Custom - Async
excludes all conflicts from being committed and registers them in the read-only conflicts feed for deferred resolution by the user’s application
API
- determines the type of account to create
- each API requires a separate account.
- SQL (document database),
- Gremlin (graph database),
- MongoDB (document database),
- Azure Table
- Cassandra
-
-
scenarios
- Delivering low-latency data access to end users no matter where they are located around the globe
- Adding regional resiliency for business continuity and disaster recovery (BCDR)
Multi-region Writes
- enables you to write to multiple regions at the same time.
- This setting can only be configured during account creation.
your data is available for operations within 30 minutes,
assuming your data is 100 TBs or less
When a database is replicated,
the throughput and storage are replicated equally as well