Skip to content

Instantly share code, notes, and snippets.

View markjbrown's full-sized avatar

Mark Brown markjbrown

View GitHub Profile

Many distributed NoSQL databases (and Cosmos DB specifically) are unique in their ability to scale to massive size but still maintain millisecond request latencies and also remain highly efficient in performance AND cost. However, achieving this takes knowledge. Finding an optimal design also requires some trial and error too as you will have to test at scale to validate your design will scale.

For those who are new to distributed NoSQL databases (and especially if you have years of experience in designing and using relational databases) and want to undestand how to design a database for scale and performance we recommended consuming this content below to learn some of these key concepts and techniques before getting too far in your design.

Generally speaking, deep undestanding of relational database design will not help in this regard. In fact, in most cases applying relational concepts and techniques are anti-patterns here. Additionally, some of the concepts are unintuitive.

We hope you find this conte

@markjbrown
markjbrown / MyStack.cs
Created September 27, 2020 17:05
Pulumi Cosmos DB Quickstart Stack
using Pulumi;
using Pulumi.AzureNextGen.Resources.Latest;
using Pulumi.AzureNextGen.DocumentDB.Latest;
using Pulumi.AzureNextGen.DocumentDB.Latest.Inputs;
using System.Collections.Generic;
using System.Collections.Immutable;
class MyStack : Stack
{
@markjbrown
markjbrown / free-tier-arm-template-example
Last active January 30, 2024 20:11
Create a Cosmos DB free-tier account and database with 400 RU
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"databaseAccount_free_tier_name": {
"defaultValue": "my-cosmos-account-name",
"type": "String"
}
},
"variables": {},

Keybase proof

I hereby claim:

  • I am markjbrown on github.
  • I am markjbrown (https://keybase.io/markjbrown) on keybase.
  • I have a public key ASBvDUGU8EzJDZNI3jeXzgZuTueAtsplqP1zXTNwAJKHLAo

To claim this, I am signing this object:

@markjbrown
markjbrown / azure-cosmos-db-performance-resources
Created October 4, 2018 23:30
Cosmos DB articles and resources to help with performance analysis, testing, tuning
Articles and resources to help with performance analysis, testing, tuning...
Articles
[Tuning query performance with Azure Cosmos DB](https://docs.microsoft.com/en-us/azure/cosmos-db/sql-api-sql-query-metrics)
[Performance tips for Azure Cosmos DB](https://docs.microsoft.com/en-us/azure/cosmos-db/performance-tips)
[Debugging why queries are running slow](https://docs.microsoft.com/en-us/azure/cosmos-db/use-metrics#debugging-why-queries-are-running-slow)
[Index Performance Tuning](https://docs.microsoft.com/en-us/azure/cosmos-db/indexing-policies#performance-tuning)
[Tunable data consistency levels in Azure Cosmos DB](https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels)
[Set and get throughput for Azure Cosmos DB containers and database](https://docs.microsoft.com/en-us/azure/cosmos-db/set-throughput)