Build Scalable Inventory System with Azure Cosmos DB
summary
Builds an event-sourced inventory using Azure Cosmos DB with two concrete designs: an async pipeline that ingests immutable events into an inventory ledger, runs an Azure Functions change-feed worker that uses change feed + patch API with conditional patching to update snapshot documents (handles at-least-once delivery), and a sync pattern that keeps events and snapshots in one container using transactional batch (per-partition) to prevent oversell. Demonstrated 10k TPS for async (2.5k writes / 8k reads, 60min) and ~19.9k writes/sec for sync with P99 latencies under ~9ms, and cost estimates ~$3.6k vs ~$3.0k/month; includes analytics via Azure Cosmos DB Mirroring in Microsoft Fabric.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 0:42Use Case
- 1:25Design Pattern
- 2:38Implementation
- 3:48Demo
- 9:40Scaling
- 12:50Sync Pattern
- 14:50Business Rules
- 16:30Portal
- 18:13CoPilot
- 19:42Cost per month
- 20:04Conclusion
related talks
20mHow Azure Cosmos DB enables Event Sourcing architecture
20mHow Azure Cosmos DB enables Event Sourcing architecture and powers e-commerce
39mBuilding Event-Driven Systems at Scale with Cosmos DB
01h 02mFrom SQL to Azure Cosmos DB
01h 01mServerless & Schemaless with Azure Functions and CosmosDB
43mDatabase capabilities you need for your next awesome app Q&A
27mAzure Cosmos DB Changefeed tales from the trenches
47mBuild scalable cloud-native apps with AKS and Azure Cosmos DB
