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

Dutch Azure Meetup - Cosmos DB overview

Pascal Naber
December 13, 2017
38

Dutch Azure Meetup - Cosmos DB overview

Pascal Naber

December 13, 2017
Tweet

More Decks by Pascal Naber

Transcript

  1. SSID: Xebia-Amsterdam-Guest PWD: EasyAccess 18:00 Walk-in & Dinner 18:45 Introduction

    Cosmos DB 19:15 Hands-on Rebel Alliance Missions 20:30 Mission results & recap 21:00 Beer and other drinks
  2. Cosmos DB: unique offering Multiple consistency models Guaranteed: Low latency

    High availability Predictable throughput Schema agnostic Elastic horizontally scale out Multi model Globally distributed
  3. Cosmos DB Container Cassandra (Column) Document DB (SQL) (Document) Mongo

    DB (Document) Gremlin (Graph) Table (Key-Value) Collection Document Graph … Cosmos DB API’s
  4. Key-Value • Key • PartitionKey • RowKey • Value •

    Properties TableEntity Microsoft.Azure.CosmosDB.Table WindowsAzure.Storage
  5. Table Storage vs Cosmos DB Table API WindowsAzure.Storage Microsoft.Azure.CosmosDB.Table Read

    99,9% LRS, ZRS, Read 99,99 % GRS Write 99,9% 99,99 % for availability, throughput, latency and consistency Query Max 10 seconds processing Single Entity Table Operations Max 2 seconds Max 10 ms latency read Max 15 ms latency write 1 region extra with GRS based on region pair (no failover) World wide (all regions) (all are failovers) Max 500 TB Unlimited Max 2.000 tx per second on partition Unlimited Max 20.000 tx per second on table Unlimited Ingress – 5 GBPS (10 LRS) Non-US Unlimited Egress – 10 GBPS (15 LRS) Non-US Unlimited HDD storage SSD Storage Index on RowKey & PartitionKey Index on all data Storage optimized pricing model Throughput optimized pricing model
  6. • The data distribution is even across all the keys.

    • The workload is even across all the keys. • The larger the number of keys, the better Partitioning best practices
  7. Azure Cosmos DB 01 Strong Bounded Staleness Session Consistent Prefix

    Eventual 5 well-defined consistency models Clear Tradeoffs • Latency • Availability • Throughput
  8. 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
  9. Emulator for local development https://aka.ms/cosmosdb-emulator Try Azure Cosmos DB for

    free https://azure.microsoft.com/en-us/try/cosmosdb/ Capacity planner https://www.documentdb.com/capacityplanner Good to know docker pull microsoft/azure-cosmosdb-emulator
  10. Change feed: materialized view Score Game Name 10 Fifa Piet

    8 Gta Kees 12 Fifa Jan 4 Fifa Klaas 6 Gta Truus HighScore Game Name 12 Fifa Jan 8 Gta Kees Microsoft.Azure.DocumentDB.ChangeFeedProcessor
  11. Json MongoDB SQL Server Csv files Azure Table Storage Amazon

    DynamoDB Hbase Every four hours Manual backups Backups