SlideShare une entreprise Scribd logo
1  sur  14
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

Contenu connexe

Tendances

Scaling MySQL using Fabric
Scaling MySQL using FabricScaling MySQL using Fabric
Scaling MySQL using FabricKarthik .P.R
 
Clustered Columnstore - Deep Dive
Clustered Columnstore - Deep DiveClustered Columnstore - Deep Dive
Clustered Columnstore - Deep DiveNiko Neugebauer
 
Transitioning From SQL Server to MySQL - Presentation from Percona Live 2016
Transitioning From SQL Server to MySQL - Presentation from Percona Live 2016Transitioning From SQL Server to MySQL - Presentation from Percona Live 2016
Transitioning From SQL Server to MySQL - Presentation from Percona Live 2016Dylan Butler
 
Columnstore improvements in SQL Server 2016
Columnstore improvements in SQL Server 2016Columnstore improvements in SQL Server 2016
Columnstore improvements in SQL Server 2016Niko Neugebauer
 
MySQL HA Percona cluster @ MySQL meetup Mumbai
MySQL HA Percona cluster @ MySQL meetup MumbaiMySQL HA Percona cluster @ MySQL meetup Mumbai
MySQL HA Percona cluster @ MySQL meetup MumbaiRemote MySQL DBA
 
The Evolution of Open Source Databases
The Evolution of Open Source DatabasesThe Evolution of Open Source Databases
The Evolution of Open Source DatabasesIvan Zoratti
 
Application Development with Apache Cassandra as a Service
Application Development with Apache Cassandra as a ServiceApplication Development with Apache Cassandra as a Service
Application Development with Apache Cassandra as a ServiceWSO2
 
SQL Azure for ISUG(SQL Server Israeli User Group)
SQL Azure for ISUG(SQL Server Israeli User Group)SQL Azure for ISUG(SQL Server Israeli User Group)
SQL Azure for ISUG(SQL Server Israeli User Group)Pini Krisher
 
MySQL Query Optimization (Basics)
MySQL Query Optimization (Basics)MySQL Query Optimization (Basics)
MySQL Query Optimization (Basics)Karthik .P.R
 
Migrating Oracle database to PostgreSQL
Migrating Oracle database to PostgreSQLMigrating Oracle database to PostgreSQL
Migrating Oracle database to PostgreSQLUmair Mansoob
 
Rolling With Riak
Rolling With RiakRolling With Riak
Rolling With RiakJohn Lynch
 
Ansible for large scale deployment
Ansible for large scale deploymentAnsible for large scale deployment
Ansible for large scale deploymentKarthik .P.R
 
Scaling the Web: Databases & NoSQL
Scaling the Web: Databases & NoSQLScaling the Web: Databases & NoSQL
Scaling the Web: Databases & NoSQLRichard Schneeman
 
Introduction to SharePoint for SQLserver DBAs
Introduction to SharePoint for SQLserver DBAsIntroduction to SharePoint for SQLserver DBAs
Introduction to SharePoint for SQLserver DBAsSteve Knutson
 
MySQL Storage Engines
MySQL Storage EnginesMySQL Storage Engines
MySQL Storage EnginesKarthik .P.R
 
Scaling with Riak at Showyou
Scaling with Riak at ShowyouScaling with Riak at Showyou
Scaling with Riak at ShowyouJohn Muellerleile
 
Thug feb 23 2015 Chen Zhang
Thug feb 23 2015 Chen ZhangThug feb 23 2015 Chen Zhang
Thug feb 23 2015 Chen ZhangChen Zhang
 
Whats new in Columnstore Indexes for SQL Server 2017
Whats new in Columnstore Indexes for SQL Server 2017Whats new in Columnstore Indexes for SQL Server 2017
Whats new in Columnstore Indexes for SQL Server 2017Niko Neugebauer
 
Using NoSQL MongoDB with ColdFusion
Using NoSQL MongoDB with ColdFusionUsing NoSQL MongoDB with ColdFusion
Using NoSQL MongoDB with ColdFusionindiver
 

Tendances (20)

Scaling MySQL using Fabric
Scaling MySQL using FabricScaling MySQL using Fabric
Scaling MySQL using Fabric
 
Clustered Columnstore - Deep Dive
Clustered Columnstore - Deep DiveClustered Columnstore - Deep Dive
Clustered Columnstore - Deep Dive
 
Transitioning From SQL Server to MySQL - Presentation from Percona Live 2016
Transitioning From SQL Server to MySQL - Presentation from Percona Live 2016Transitioning From SQL Server to MySQL - Presentation from Percona Live 2016
Transitioning From SQL Server to MySQL - Presentation from Percona Live 2016
 
Columnstore improvements in SQL Server 2016
Columnstore improvements in SQL Server 2016Columnstore improvements in SQL Server 2016
Columnstore improvements in SQL Server 2016
 
MySQL HA Percona cluster @ MySQL meetup Mumbai
MySQL HA Percona cluster @ MySQL meetup MumbaiMySQL HA Percona cluster @ MySQL meetup Mumbai
MySQL HA Percona cluster @ MySQL meetup Mumbai
 
The Evolution of Open Source Databases
The Evolution of Open Source DatabasesThe Evolution of Open Source Databases
The Evolution of Open Source Databases
 
Application Development with Apache Cassandra as a Service
Application Development with Apache Cassandra as a ServiceApplication Development with Apache Cassandra as a Service
Application Development with Apache Cassandra as a Service
 
SQL Azure for ISUG(SQL Server Israeli User Group)
SQL Azure for ISUG(SQL Server Israeli User Group)SQL Azure for ISUG(SQL Server Israeli User Group)
SQL Azure for ISUG(SQL Server Israeli User Group)
 
MySQL Query Optimization (Basics)
MySQL Query Optimization (Basics)MySQL Query Optimization (Basics)
MySQL Query Optimization (Basics)
 
Migrating Oracle database to PostgreSQL
Migrating Oracle database to PostgreSQLMigrating Oracle database to PostgreSQL
Migrating Oracle database to PostgreSQL
 
Rails on HBase
Rails on HBaseRails on HBase
Rails on HBase
 
Rolling With Riak
Rolling With RiakRolling With Riak
Rolling With Riak
 
Ansible for large scale deployment
Ansible for large scale deploymentAnsible for large scale deployment
Ansible for large scale deployment
 
Scaling the Web: Databases & NoSQL
Scaling the Web: Databases & NoSQLScaling the Web: Databases & NoSQL
Scaling the Web: Databases & NoSQL
 
Introduction to SharePoint for SQLserver DBAs
Introduction to SharePoint for SQLserver DBAsIntroduction to SharePoint for SQLserver DBAs
Introduction to SharePoint for SQLserver DBAs
 
MySQL Storage Engines
MySQL Storage EnginesMySQL Storage Engines
MySQL Storage Engines
 
Scaling with Riak at Showyou
Scaling with Riak at ShowyouScaling with Riak at Showyou
Scaling with Riak at Showyou
 
Thug feb 23 2015 Chen Zhang
Thug feb 23 2015 Chen ZhangThug feb 23 2015 Chen Zhang
Thug feb 23 2015 Chen Zhang
 
Whats new in Columnstore Indexes for SQL Server 2017
Whats new in Columnstore Indexes for SQL Server 2017Whats new in Columnstore Indexes for SQL Server 2017
Whats new in Columnstore Indexes for SQL Server 2017
 
Using NoSQL MongoDB with ColdFusion
Using NoSQL MongoDB with ColdFusionUsing NoSQL MongoDB with ColdFusion
Using NoSQL MongoDB with ColdFusion
 

Similaire à Introduction to Azure's CosmosDB: Serverless, Global Distribution, and More

Deep dive to ElasticSearch - معرفی ابزار جستجوی الاستیکی
Deep dive to ElasticSearch - معرفی ابزار جستجوی الاستیکیDeep dive to ElasticSearch - معرفی ابزار جستجوی الاستیکی
Deep dive to ElasticSearch - معرفی ابزار جستجوی الاستیکیEhsan Asgarian
 
An Introduction to Elastic Search.
An Introduction to Elastic Search.An Introduction to Elastic Search.
An Introduction to Elastic Search.Jurriaan Persyn
 
Test driving Azure Search and DocumentDB
Test driving Azure Search and DocumentDBTest driving Azure Search and DocumentDB
Test driving Azure Search and DocumentDBAndrew Siemer
 
Introduction to Cosmos DB Presentation.pptx
Introduction to Cosmos DB Presentation.pptxIntroduction to Cosmos DB Presentation.pptx
Introduction to Cosmos DB Presentation.pptxKnoldus Inc.
 
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesDropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesKyle Banerjee
 
Solr cloud the 'search first' nosql database extended deep dive
Solr cloud the 'search first' nosql database   extended deep diveSolr cloud the 'search first' nosql database   extended deep dive
Solr cloud the 'search first' nosql database extended deep divelucenerevolution
 
NoSQL for great good [hanoi.rb talk]
NoSQL for great good [hanoi.rb talk]NoSQL for great good [hanoi.rb talk]
NoSQL for great good [hanoi.rb talk]Huy Do
 
Azure cosmos db, Azure no-SQL database,
Azure cosmos db, Azure no-SQL database, Azure cosmos db, Azure no-SQL database,
Azure cosmos db, Azure no-SQL database, BRIJESH KUMAR
 
Big data technology unit 3
Big data technology unit 3Big data technology unit 3
Big data technology unit 3RojaT4
 
ElasticSearch: Distributed Multitenant NoSQL Datastore and Search Engine
ElasticSearch: Distributed Multitenant NoSQL Datastore and Search EngineElasticSearch: Distributed Multitenant NoSQL Datastore and Search Engine
ElasticSearch: Distributed Multitenant NoSQL Datastore and Search EngineDaniel N
 
Mongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorialMongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorialMohan Rathour
 
Microsoft Azure DocumentDB - Global Azure Bootcamp 2016
Microsoft Azure DocumentDB -  Global Azure Bootcamp 2016Microsoft Azure DocumentDB -  Global Azure Bootcamp 2016
Microsoft Azure DocumentDB - Global Azure Bootcamp 2016Sunny Sharma
 

Similaire à Introduction to Azure's CosmosDB: Serverless, Global Distribution, and More (20)

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

Plus de Josh Carlisle

Serverless Days Amsterdam - Choosing a Serverless Monitoring Platform
Serverless Days Amsterdam - Choosing a Serverless Monitoring PlatformServerless Days Amsterdam - Choosing a Serverless Monitoring Platform
Serverless Days Amsterdam - Choosing a Serverless Monitoring PlatformJosh Carlisle
 
Transforming Your Business with Serverless
Transforming Your Business with ServerlessTransforming Your Business with Serverless
Transforming Your Business with ServerlessJosh Carlisle
 
Transforming your Business with Serverless
Transforming your Business with ServerlessTransforming your Business with Serverless
Transforming your Business with ServerlessJosh Carlisle
 
Rainbows, Unicorns, and other Fairy Tales in the Land of Serverless Dreams
Rainbows, Unicorns, and other Fairy Tales in the Land of Serverless DreamsRainbows, Unicorns, and other Fairy Tales in the Land of Serverless Dreams
Rainbows, Unicorns, and other Fairy Tales in the Land of Serverless DreamsJosh Carlisle
 
Azure Messaging with Azure Functions
Azure Messaging with Azure FunctionsAzure Messaging with Azure Functions
Azure Messaging with Azure FunctionsJosh Carlisle
 
Building Resilient Azure Solutions for Office 365 - SharePoint Saturday Atlan...
Building Resilient Azure Solutions for Office 365 - SharePoint Saturday Atlan...Building Resilient Azure Solutions for Office 365 - SharePoint Saturday Atlan...
Building Resilient Azure Solutions for Office 365 - SharePoint Saturday Atlan...Josh Carlisle
 

Plus de Josh Carlisle (6)

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

Dernier

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 

Dernier (20)

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 

Introduction to Azure's CosmosDB: Serverless, Global Distribution, and More

  • 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