Sitemap
Geek Culture

A new tech publication by Start it up (https://medium.com/swlh).

Member-only story

Building Multitenant App using Azure Cosmos DB in Clean Architecture

Shawn Shi
10 min readMar 1, 2023

--

Multitenancy using Azure Cosmos DB in Clean Architecture (CA image credit to Microsoft documentation)

Background

When building multi-tenant applications using Azure Cosmos DB (or other NoSQL databases), there are multiple popular data isolation models:

  • Partition key per tenant
  • Container per tenant
  • Database per tenant

Microsoft has a detailed documentation, Multitenancy and Azure Cosmos DB, covering how Azure Cosmos DB can support different isolation models in full technical terms. In my previous article, Understanding Multitenancy Isolation Models in Plain English, we also discussed different isolation models at the high-level in plain English (but fun approach).

How do we actually build one multi-tenant application with partition per tenant isolation model using Azure Cosmos DB?

Goal

Let’s assume we are building a simplified ticket tracking platform, i.e., a SaaS product similar to Jira or Azure DevOps. It should allow individual businesses to manage their support tickets. Each business…

--

--

Shawn Shi
Shawn Shi

Written by Shawn Shi

Senior Software Engineer at Microsoft. Ex-Machine Learning Engineer. When I am not building applications, I am playing with my kids or outside rock climbing!

No responses yet