SlideShare a Scribd company logo
Josh Carlisle
@joshcarlisle
Introduction to Azure’s CosmosDB
#CosmosDB #Serverless #Azure
Who Am I
• Raleigh North Carolina
• Developer x 20 years
• Twitter: @joshcarlisle
• Web: www.joshcarlisle.io
• Github: https://github.com/joshdcar
• Email: joshc@viewfusion.com
Azure Cosmos DB
No SQL Cloud Managed Database (think MongoDB, Cassandra, CouchDB)
Turnkey Global Distribution
Multiple Models
High Availability (up to 99.999%)
Very Low Latency Reads (median 2ms, SLA 10ms*)
Very Low Latency Writes (median 6ms, SLA 15ms*)
Configurable Throughput (how many readswrites per second) (RUs)
* same region @joshcarlisle
CosmosDB  No SQL– Another Tool in the Toolkit
Pros:
• Semi-Structured Data (JSON)
• Flexible Schema
• Reduced Impedance Mismatch
• Supports VERY large data stores
• Very Fast (No Joins)
• High concurrency
• Scales very well
• Auto Indexing
Cons:
• Not relational
• Denormalized Data (duplicate)
• Less Transaction Support (same partition)
• No “referential integrity” and constraints
• Limited SQL Support
• No Schema Enforcements
• Different Paradigm Shift
• Not as mature
@joshcarlisle
Turnkey Global Distribution
• Master Write Region OR
multiple write regions
• Change Write region
dynamically “Follow the Clock”
• Designate Failover Regions
• Transparent to Applications
(API manages “closest” region)
• Various Consistency Options
@joshcarlisle
CosmosDB Consistency Models
Strong Consistency Eventual Consistency
Latency
Strong Bounded-
staleness
Session Consistent
Prefix
Eventual
https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels
@joshcarlisle
Multiple Models
mongoDB
SQL
Table API
Azure Cosmos DB
@joshcarlisle
Request Units
• An abstraction of Memory, CPU, and IOPS
• Used to reserve throughput to ensure SLA
• 1 RU = 1 read of 1KB Document
• Applies to activities (reads, writes, queries, stored procedures)
• Background processes (TTL, Indexing) scheduled during low RU utilization.
• Requests > RUs = Throttling (rate-limiting)
• SDK handles auto-retry on rate limit responses
• Can be adjusted dynamically through the CosmosDB API
@joshcarlisle
Practical Guidance - Modeling
• Self Contained Entities
• Accept Denormalization
• Consider Partition Key Carefully
@joshcarlisle
Practical Guidance – Modeling (cont)
• Careful about unbounded collections in model (One to Few = good , One to Many = bad)
• Use reference to other related entities
@joshcarlisle
.Net Development with CosmosDB & SQL Model
• Local CosmosDB Emulator Available
• Nuget Packages for .Net Framework and Core (in addition to other languages)
• SQL Query Syntax andor Linq Query Support
• Use the SDK vs REST – it provides built in capabilities such as automatic retry when throttled.
@joshcarlisle
Azure Search + CosmosDB = Awesome!
If you have heavy search requirements or you are find that you
are struggling with performance or modeling impact of search
consider using Azure Search.
 Azure Search has a native CosmosDB search indexer
 Supports SQL API Only (MongoDB in Preview)
 Transform your data for optimizations (e.g. flatten)
Missing Features
• Tools are always improving but feel limited in comparison to relational tools such as SQL
Management Studio and official tools are generally portal based.
• Group By and Distinct Aggregation Still Missing (Coming). Currently supports Count, Sum, Min,
Max, Avg) and then only one at a time.
• Limited Order By (Properties not derived values)
• No Partial Updates (Coming)
• No Batch Operation Support (stored procedure work arounds)
• AutoScale Reserved Units Throughput (RUs) (Planned)
• More granular billing options (currently RU at the container level)
@joshcarlisle
Additional Resources
• Source Code: https://github.com/joshdcar
• Twitter: @joshcarlisle
• Blog : http://www.joshcarlisle.io
• Twitter Users to follow:
 @AzureCosmsosDB
 @crandycodes
 @rimmanehme
• Tools
 Storage Explorer - https://azure.microsoft.com/en-us/features/storage-explorer/
@joshcarlisle

More Related Content

PDF
CosmosDB for DBAs & Developers
PDF
Building Google-in-a-box: using Apache SolrCloud and Bigtop to index your big...
PDF
HBaseCon2017 Apache HBase at Didi
PPTX
Compare DynamoDB vs. MongoDB
PPTX
Javascript on Server-Side
PDF
Scaling Pinterest
PDF
Why we love ArangoDB. The hunt for the right NosQL Database
PPT
Scaling MySQL using Fabric
CosmosDB for DBAs & Developers
Building Google-in-a-box: using Apache SolrCloud and Bigtop to index your big...
HBaseCon2017 Apache HBase at Didi
Compare DynamoDB vs. MongoDB
Javascript on Server-Side
Scaling Pinterest
Why we love ArangoDB. The hunt for the right NosQL Database
Scaling MySQL using Fabric

What's hot (20)

PDF
Clustered Columnstore - Deep Dive
PDF
Transitioning From SQL Server to MySQL - Presentation from Percona Live 2016
PDF
Columnstore improvements in SQL Server 2016
PPT
MySQL HA Percona cluster @ MySQL meetup Mumbai
PDF
The Evolution of Open Source Databases
PDF
Application Development with Apache Cassandra as a Service
PPTX
SQL Azure for ISUG(SQL Server Israeli User Group)
PDF
MySQL Query Optimization (Basics)
PDF
Migrating Oracle database to PostgreSQL
PDF
Rails on HBase
PPT
Rolling With Riak
PPTX
Ansible for large scale deployment
PDF
Scaling the Web: Databases & NoSQL
PDF
Introduction to SharePoint for SQLserver DBAs
PDF
MySQL Storage Engines
PDF
Scaling with Riak at Showyou
PDF
Thug feb 23 2015 Chen Zhang
PDF
Whats new in Columnstore Indexes for SQL Server 2017
KEY
Using NoSQL MongoDB with ColdFusion
PDF
An Introduction to Amazon’s DynamoDB
Clustered Columnstore - Deep Dive
Transitioning From SQL Server to MySQL - Presentation from Percona Live 2016
Columnstore improvements in SQL Server 2016
MySQL HA Percona cluster @ MySQL meetup Mumbai
The Evolution of Open Source Databases
Application Development with Apache Cassandra as a Service
SQL Azure for ISUG(SQL Server Israeli User Group)
MySQL Query Optimization (Basics)
Migrating Oracle database to PostgreSQL
Rails on HBase
Rolling With Riak
Ansible for large scale deployment
Scaling the Web: Databases & NoSQL
Introduction to SharePoint for SQLserver DBAs
MySQL Storage Engines
Scaling with Riak at Showyou
Thug feb 23 2015 Chen Zhang
Whats new in Columnstore Indexes for SQL Server 2017
Using NoSQL MongoDB with ColdFusion
An Introduction to Amazon’s DynamoDB
Ad

Similar to Introduction to CosmosDB - Azure Bootcamp 2018 (20)

PDF
Deep dive to ElasticSearch - معرفی ابزار جستجوی الاستیکی
PPTX
CosmosDB.pptx
PPTX
An Introduction to Elastic Search.
PPTX
Drop acid
PPTX
NoSQL and MongoDB
PPTX
Test driving Azure Search and DocumentDB
PPTX
Introduction to Cosmos DB Presentation.pptx
PPTX
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
PPT
No sql Database
PDF
Solr cloud the 'search first' nosql database extended deep dive
PPTX
PDF
NoSQL for great good [hanoi.rb talk]
PPTX
Agile xml
PPTX
Azure cosmos db, Azure no-SQL database,
PPTX
ORM Methodology
PPTX
MongoDB
PPTX
Big data technology unit 3
PDF
ElasticSearch: Distributed Multitenant NoSQL Datastore and Search Engine
PPT
Mongo Bb - NoSQL tutorial
PPTX
Microsoft Azure DocumentDB - Global Azure Bootcamp 2016
Deep dive to ElasticSearch - معرفی ابزار جستجوی الاستیکی
CosmosDB.pptx
An Introduction to Elastic Search.
Drop acid
NoSQL and MongoDB
Test driving Azure Search and DocumentDB
Introduction to Cosmos DB Presentation.pptx
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
No sql Database
Solr cloud the 'search first' nosql database extended deep dive
NoSQL for great good [hanoi.rb talk]
Agile xml
Azure cosmos db, Azure no-SQL database,
ORM Methodology
MongoDB
Big data technology unit 3
ElasticSearch: Distributed Multitenant NoSQL Datastore and Search Engine
Mongo Bb - NoSQL tutorial
Microsoft Azure DocumentDB - Global Azure Bootcamp 2016
Ad

More from Josh Carlisle (6)

PPTX
Serverless Days Amsterdam - Choosing a Serverless Monitoring Platform
PPTX
Transforming Your Business with Serverless
PPTX
Transforming your Business with Serverless
PPTX
Rainbows, Unicorns, and other Fairy Tales in the Land of Serverless Dreams
PPTX
Azure Messaging with Azure Functions
PPTX
Building Resilient Azure Solutions for Office 365 - SharePoint Saturday Atlan...
Serverless Days Amsterdam - Choosing a Serverless Monitoring Platform
Transforming Your Business with Serverless
Transforming your Business with Serverless
Rainbows, Unicorns, and other Fairy Tales in the Land of Serverless Dreams
Azure Messaging with Azure Functions
Building Resilient Azure Solutions for Office 365 - SharePoint Saturday Atlan...

Recently uploaded (20)

PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Empathic Computing: Creating Shared Understanding
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Machine learning based COVID-19 study performance prediction
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Encapsulation theory and applications.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
MYSQL Presentation for SQL database connectivity
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Empathic Computing: Creating Shared Understanding
The AUB Centre for AI in Media Proposal.docx
Big Data Technologies - Introduction.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation_ Review paper, used for researhc scholars
“AI and Expert System Decision Support & Business Intelligence Systems”
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Unlocking AI with Model Context Protocol (MCP)
Machine learning based COVID-19 study performance prediction
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Encapsulation theory and applications.pdf
Understanding_Digital_Forensics_Presentation.pptx
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
The Rise and Fall of 3GPP – Time for a Sabbatical?
MYSQL Presentation for SQL database connectivity
NewMind AI Monthly Chronicles - July 2025
Reach Out and Touch Someone: Haptics and Empathic Computing

Introduction to CosmosDB - Azure Bootcamp 2018

  • 1. Josh Carlisle @joshcarlisle Introduction to Azure’s CosmosDB #CosmosDB #Serverless #Azure
  • 2. Who Am I • Raleigh North Carolina • Developer x 20 years • Twitter: @joshcarlisle • Web: www.joshcarlisle.io • Github: https://github.com/joshdcar • Email: joshc@viewfusion.com
  • 3. Azure Cosmos DB No SQL Cloud Managed Database (think MongoDB, Cassandra, CouchDB) Turnkey Global Distribution Multiple Models High Availability (up to 99.999%) Very Low Latency Reads (median 2ms, SLA 10ms*) Very Low Latency Writes (median 6ms, SLA 15ms*) Configurable Throughput (how many readswrites per second) (RUs) * same region @joshcarlisle
  • 4. CosmosDB No SQL– Another Tool in the Toolkit Pros: • Semi-Structured Data (JSON) • Flexible Schema • Reduced Impedance Mismatch • Supports VERY large data stores • Very Fast (No Joins) • High concurrency • Scales very well • Auto Indexing Cons: • Not relational • Denormalized Data (duplicate) • Less Transaction Support (same partition) • No “referential integrity” and constraints • Limited SQL Support • No Schema Enforcements • Different Paradigm Shift • Not as mature @joshcarlisle
  • 5. Turnkey Global Distribution • Master Write Region OR multiple write regions • Change Write region dynamically “Follow the Clock” • Designate Failover Regions • Transparent to Applications (API manages “closest” region) • Various Consistency Options @joshcarlisle
  • 6. CosmosDB Consistency Models Strong Consistency Eventual Consistency Latency Strong Bounded- staleness Session Consistent Prefix Eventual https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels @joshcarlisle
  • 8. Request Units • An abstraction of Memory, CPU, and IOPS • Used to reserve throughput to ensure SLA • 1 RU = 1 read of 1KB Document • Applies to activities (reads, writes, queries, stored procedures) • Background processes (TTL, Indexing) scheduled during low RU utilization. • Requests > RUs = Throttling (rate-limiting) • SDK handles auto-retry on rate limit responses • Can be adjusted dynamically through the CosmosDB API @joshcarlisle
  • 9. Practical Guidance - Modeling • Self Contained Entities • Accept Denormalization • Consider Partition Key Carefully @joshcarlisle
  • 10. Practical Guidance – Modeling (cont) • Careful about unbounded collections in model (One to Few = good , One to Many = bad) • Use reference to other related entities @joshcarlisle
  • 11. .Net Development with CosmosDB & SQL Model • Local CosmosDB Emulator Available • Nuget Packages for .Net Framework and Core (in addition to other languages) • SQL Query Syntax andor Linq Query Support • Use the SDK vs REST – it provides built in capabilities such as automatic retry when throttled. @joshcarlisle
  • 12. Azure Search + CosmosDB = Awesome! If you have heavy search requirements or you are find that you are struggling with performance or modeling impact of search consider using Azure Search.  Azure Search has a native CosmosDB search indexer  Supports SQL API Only (MongoDB in Preview)  Transform your data for optimizations (e.g. flatten)
  • 13. Missing Features • Tools are always improving but feel limited in comparison to relational tools such as SQL Management Studio and official tools are generally portal based. • Group By and Distinct Aggregation Still Missing (Coming). Currently supports Count, Sum, Min, Max, Avg) and then only one at a time. • Limited Order By (Properties not derived values) • No Partial Updates (Coming) • No Batch Operation Support (stored procedure work arounds) • AutoScale Reserved Units Throughput (RUs) (Planned) • More granular billing options (currently RU at the container level) @joshcarlisle
  • 14. Additional Resources • Source Code: https://github.com/joshdcar • Twitter: @joshcarlisle • Blog : http://www.joshcarlisle.io • Twitter Users to follow:  @AzureCosmsosDB  @crandycodes  @rimmanehme • Tools  Storage Explorer - https://azure.microsoft.com/en-us/features/storage-explorer/ @joshcarlisle