Presentation is loading. Please wait.

Presentation is loading. Please wait.

Azure Cosmos DB: The globally distributed, multi-model database

Similar presentations


Presentation on theme: "Azure Cosmos DB: The globally distributed, multi-model database"— Presentation transcript:

1 Azure Cosmos DB: The globally distributed, multi-model database
9/19/2018 8:59 AM BRK3086 Azure Cosmos DB: The globally distributed, multi-model database Andrew Hoh Program Manager © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

2

3 Building globally distributed applications
Mission-critical applications for a global userbase need … Global distribution Elasticity of compute and storage Fast, Responsive millisecond latency Durable, Consistent and Highly available

4 What sets Azure Cosmos DB apart

5 Turnkey Global Distribution
Worldwide presence as a Foundational Azure service Automatic multi-region replication Multi-homing APIs Manual and automatic failovers Designed for High Availability

6 Global Distribution Demo
9/19/2018 8:59 AM Global Distribution Demo © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

7 Guaranteed low latency at P99 (99th percentile)
Requests are served from local region Single-digit millisecond latency worldwide Write optimized, latch-free database engine designed for SSD Synchronous automatic indexing at sustained ingestion rates

8 Multiple, well-defined consistency choices
Global distribution forces us to navigate the CAP theorem Writing correct distributed applications is hard Five well-defined consistency levels Intuitive and practical with clear PACELC tradeoffs Programmatically change at anytime Can be overridden on a per-request basis

9 Elastically scalable storage and throughput
Provisioned request / sec Time Nov 2016 Dec 2016 Black Friday Hourly throughput (request/sec) Single machine is never a bottle neck Transparent server-side partition management Elastically scale storage (GB to PB) and throughput (100 to 100M req/sec) across many machines and multiple regions Automatic expiration via policy based TTL Pay by the hour, change throughput at any time for only what you need Support for both request per second and requests per minute to handle spikes cost-effectively

10 Multi-model, multi-API
Database engine operates on Atom-Record-Sequence type system All data models can be efficiently translated to ARS Multi-model: Key-value, Document, and Graph Multi-API: SQL (DocumentDB), MongoDB, Table, and Gremlin More data-models and APIs to be added

11 Schema-agnostic, automatic indexing
At global scale, schema/index management is painful Automatic and synchronous indexing Hash, range, and geospatial Works across every data model Highly write-optimized database engine Schema Physical index

12 Cosmos DB Query Playground
9/19/2018 8:59 AM Cosmos DB Query Playground © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

13 Industry-leading, enterprise-grade SLAs
99.99% availability – even with a single region Made possible with highly-redundant storage architecture Guaranteed durability – writes are majority quorum committed First and only service to offer SLAs on: Low-latency Consistency Throughput

14 Security & Compliance Always encrypted at rest and in motion
Fine grained “row level” authorization Network security with IP firewall rules Comprehensive Azure compliance certification: ISO 27001 ISO 27018 EUMC HIPAA PCI SOC1 and SOC2

15 Lowest Total Cost of Ownership (TCO) $ 10x
Deeply exploit cloud core properties and economies of scale Significantly cheaper than DynamoDB, Cassandra, Cloud Spanner and MongoDB Designed from the ground up as a multi-tenant service with end-to-end resource governance to provide performance isolation. Fully managed as a service - no dev/ops expenses needed Cost $ 3x Cosmos DB DynamoDB On-premises MongoDB/ Cassandra

16 Who uses Cosmos DB?

17 Skype Ingestion service
Skype powers 1M searches per second over conversation data Key benefits Cosmos DB supports fast ingestion of message data from 1:1 communication, group chats Cosmos DB enables real-time query over message and group conversations, with custom filters on when user enters/leaves thread Azure Cosmos DB USERS GROUPS MESSAGES Skype Ingestion service Skype Query service Business need Provide search capabilities over TBs-PBs of Skype and Teams conversations Fast ingestion with multiple writes, overlay group memberships Secure & compliant data storage with high privacy requirements 6TB User data 1TB Group data 44TB Message data

18 8TB 250K Toyota drives connected car push forward with Azure Cosmos DB
Key benefits Cosmos DB can scale elastically without operational overhead of MongoDB Perform fast queries over events to deliver recommended services, safety notices to vehicles Perform staged migration via MongoDB APIs Azure Cosmos DB Azure HDInsight Storm Azure Storage (archival) Business need Need to ingest massive volumes of diagnostic data from vehicles and take real- time actions as part of connected car platform Management and operations of database infrastructure to handle exponential growth of data 8TB Vehicle Telemetry 250K Lexus Cars

19 E-commerce challenger eyes the top spot, runs on Azure Cosmos DB
Business need Process Ms of retail transactions per second in milliseconds in inventory pipeline during peak (“Black Friday”) Fast development cycles and loosely coupled micro-services to keep up with a competitive marketplace Key benefits Cosmos DB provides elastic scalability from 1-10M requests per second Improved reliability, and faster order processing times than previous OSS solution Reduced development time and operational overhead Azure Cosmos DB Azure Service Fabric Pricing Service Inventory Service 10M Peak RPS 12TB Provisioned 64 Databases

20 Azure Notification Hubs (push notifications)
Performance at massive scale allows millions to play mobile game Business need Handle millions of players on Day 1 due to popularity of the TV series Match-making of players for competitive and lag-free experience Provide new content weekly, and iterate on social functionality Key benefits Cosmos DB provides elastic scalability for millions of users and flexible schema to support social features and gameplay Global distribution allows for low latency for players spread worldwide Automatic indexing used to build real-time leaderboards Azure Traffic Manager Azure API Aps (game backend) Azure CDN Azure Cosmos DB Azure Functions Azure Notification Hubs (push notifications) Azure Storage (game files) #1 iOS App Store 1B Daily Queries 1M Peak Active

21 System Internals

22 = Resource Model Resources identified by their logical and stable URI
Account Resource Model Resources identified by their logical and stable URI Hierarchical overlay over horizontally partitioned entities; spanning machines, clusters and regions Extensible custom projections based on specific type of API interface Stateless interaction (HTTP and TCP) Database Container = Collection Graph Table Item

23 (partition-key = “airport”)
Horizontal Partitioning = Container Collection Graph Table Containers are horizontally partitioned Each partition made highly available via a replica set Partition management is transparent and highly responsive Partitioning scheme is dictated by a “partition-key” (partition-key = “airport”) { "airport" : "LAX" } { "airport" : “DUB" } { "airport" : "SYD" } Replica set Resource Partitions

24 Best Practices: Partitioning
All items with the same partition key will be stored in the same partition Multiple partition keys may share the same partition using hash-based partitioning Select a partition key which provides even distribution of storage and throughput (req/sec) at any given time to avoid storage and performance bottlenecks Do not use current timestamp as partition key for write heavy workloads "city" : “A-G" "city" : “H-K" "city" : “L-N" "city" : “M-Z"

25 Best Practices: Partitioning
The service handles routing query requests to the right partition using the partition key Partition key should be represented in the bulk of queries for read heavy scenarios to avoid excessive fan-out. Partition key is the boundary for cross item transactions. Select a partition key which can be a transaction scope. An ideal partition key enables you to use efficient queries and has sufficient cardinality to ensure solution is scalable ACID

26 = … Container Global Distribution
Local Distribution Global Distribution West US North Europe Australia Southeast Collection Graph Table Global Distribution All resources are horizontally partitioned and vertically distributed Distribution can be within a cluster, x-cluster, x-DC or x-region Replication topology is dynamic based on consistency level and network conditions

27 Request Units % CPU Request Units (RU) is a rate-based currency
% IOPS % CPU % Memory Request Units (RU) is a rate-based currency Abstracts physical resources for performing requests Key to multi-tenancy, SLAs, and COGS efficiency Foreground and background activities

28 Request Units Normalized across various access methods
GET POST PUT Query Request Units Normalized across various access methods 1 RU = 1 read of 1 KB document Each request consumes fixed RUs Applies to reads, writes, queries, and stored procedure execution

29 Request Units Provisioned in terms of RU/sec and RU/min granularities
Min RU/sec Max RU/sec Incoming Requests Replica Quiescent Rate limit No throttling Request Units Provisioned in terms of RU/sec and RU/min granularities Rate limiting based on amount of throughput provisioned Can be increased or decreased instantaneously Metered Hourly Background processes like TTL expiration, index transformations scheduled when quiescent

30 Capacity Planner 9/19/2018 8:59 AM
© Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

31 Cosmos DB: In Summary

32 Azure Cosmos DB Table API MongoDB API
A globally distributed, massively scalable, multi-model database service Table API MongoDB API Key-value Column-family Document Graph Guaranteed low latency at the 99th percentile Elastic scale out of storage & throughput Five well-defined consistency models Turnkey global distribution Comprehensive SLAs

33 Try Azure Cosmos DB for free!

34 Related Sessions When Code Title Wednesday, 10:15am - 11am BRK3110
Globally distributed, secure MongoDB with Azure Cosmos DB Wednesday, 1:05pm - 1:25pm THR2048 Azure Cosmos DB: From Internet to enterprise Wednesday, 4pm - 5:15pm BRK3134 Real time data-science with Azure Cosmos DB Thursday, 10:45am - 12pm BRK4008 Azure Cosmos DB, design patterns and case studies for globally distributed applications Friday, 12;30pm - 1:45pm BRK3117 Internet of things with Azure Cosmos DB

35 Please evaluate this session
Tech Ready 15 9/19/2018 Please evaluate this session From your Please expand notes window at bottom of slide and read. Then Delete this text box. PC or tablet: visit MyIgnite Phone: download and use the Microsoft Ignite mobile app Your input is important! © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

36 9/19/2018 8:59 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

37 Thank you!

38 Questions?


Download ppt "Azure Cosmos DB: The globally distributed, multi-model database"

Similar presentations


Ads by Google