Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Techdays NL - Azure Cosmos DB - a technical overview

Techdays NL - Azure Cosmos DB - a technical overview

Pascal Naber

October 13, 2017
Tweet

More Decks by Pascal Naber

Other Decks in Technology

Transcript

  1. Multiple consistency models Guaranteed: Low latency High availability Predictable throughput

    Schema agnostic Elastic horizontally scale out Multi model Globally distributed
  2. Database account Database User Permission {Container} {Item} sproc trigger UDF

    conflict attachment Collection Graph Table Document Node Row Edge
  3. • Key • PartitionKey • RowKey • Value • Properties

    TableEntity WindowsAzure.Storage-PremiumTable WindowsAzure.Storage
  4. Reads are guaranteed to see the most recent write Single

    location only! Consistency levels 1 2 3 4 5 6 7 8 9 10 Total Britt 0 1 4 2 7 Maud 0 2 3 5 Strong Consistency 7-5 Bounded Staleness (lag 5 min) 5-5, 7-5 Session (self) 7-5 Session (anybody else) 0-0, 0-2, 1-0, 1-2, 5-2, 1-5, 5-5, 7-5 Consistent Prefix 0-0, 1-0, 1-2, 5-2, 5-5, 7,5 Eventual Consistency 0-0, 0-2, 1-0, 1-2, 5-2, 1-5, 5-5, 7-5
  5. Reads can lag behind writes by a user specified number

    of versions or time interval High Latency Consistency levels 1 2 3 4 5 6 7 8 9 10 Total Britt 0 1 4 2 7 Maud 0 2 3 5 Strong Consistency 7-5 Bounded Staleness (lag 5 min) 5-5, 7-5 Session (self) 7-5 Session (anybody else) 0-0, 0-2, 1-0, 1-2, 5-2, 1-5, 5-5, 7-5 Consistent Prefix 0-0, 1-0, 1-2, 5-2, 5-5, 7,5 Eventual Consistency 0-0, 0-2, 1-0, 1-2, 5-2, 1-5, 5-5, 7-5
  6. Read My Writes Low Latency Consistency levels 1 2 3

    4 5 6 7 8 9 10 Total Britt 0 1 4 2 7 Maud 0 2 3 5 Strong Consistency 7-5 Bounded Staleness (lag 5 min) 5-5, 7-5 Session (self) 7-5 Session (anybody else) 0-0, 0-2, 1-0, 1-2, 5-2, 1-5, 5-5, 7-5 Consistent Prefix 0-0, 1-0, 1-2, 5-2, 5-5, 7,5 Eventual Consistency 0-0, 0-2, 1-0, 1-2, 5-2, 1-5, 5-5, 7-5
  7. Readers will never see writes that are out of order

    Low latency Consistency levels 1 2 3 4 5 6 7 8 9 10 Total Britt 0 1 4 2 7 Maud 0 2 3 5 Strong Consistency 7-5 Bounded Staleness (lag 5 min) 5-5, 7-5 Session (self) 7-5 Session (anybody else) 0-0, 0-2, 1-0, 1-2, 5-2, 1-5, 5-5, 7-5 Consistent Prefix 0-0, 1-0, 1-2, 5-2, 5-5, 7,5 Eventual Consistency 0-0, 0-2, 1-0, 1-2, 5-2, 1-5, 5-5, 7-5
  8. Out of order reads At the end it will be

    fine lowest read and write latency Consistency levels 1 2 3 4 5 6 7 8 9 10 Total Britt 0 1 4 2 7 Maud 0 2 3 5 Strong Consistency 7-5 Bounded Staleness (lag 5 min) 5-5, 7-5 Session (self) 7-5 Session (anybody else) 0-0, 0-2, 1-0, 1-2, 5-2, 1-5, 5-5, 7-5 Consistent Prefix 0-0, 1-0, 1-2, 5-2, 5-5, 7,5 Eventual Consistency 0-0, 0-2, 1-0, 1-2, 5-2, 1-5, 5-5, 7-5
  9. Cosmos DB Pricing (per month) RU’s p/s € 400 20,08

    1.000 50,19 5.000 250,97 10.000 501,94 50.000 2509,70 100.000 5019,40 GB € 1 0,21 10 2,11 50 10,55 100 21,09 1.000 210,90 10.000 2109,00 1 KB read 1 KB write Select by id Select by xyz Select group by Select top 10 = 1 RU = 5 RU = 2.5 RU = 7 RU = 70 RU = 10 RU
  10. Json MongoDB SQL Server Csv files Azure Table Storage Amazon

    DynamoDB Hbase Every four hours Manual backups Backups
  11. Multiple consistency models Guaranteed: Low latency High availability Predictable throughput

    Schema agnostic Elastic horizontally scale out Multi model Globally distributed