High performance storage in Azure DocumentDB (preview)

Azure DocumentDB high performance storage uses Premium SSD v2 to deliver consistent low latency and predictable IOPS for I/O-intensive workloads. This capability enables you to achieve performance scaling based on your compute and storage configurations, maximizing throughput and efficiency per vCore.

Guidance

The maximum storage performance for your Azure DocumentDB cluster depends on the combination of compute tier and storage size you select. Each combination determines the effective limits for IOPS and throughput. Start by choosing the storage size you need, then select a compute tier that provides the required Input/output operations per second (IOPS) and throughput for your workload. If you’re unsure about performance requirements:

  • Begin with the compute tier that fully unlocks the storage performance for your selected size.

  • Run workload benchmarks.

  • Gradually reduce compute until you find the smallest tier that delivers your desired performance.

IOPS and throughput caps

This section lists the limits in IOPS and throughput for each tier of Azure DocumentDB:

For more information on tiers, see compute and storage tiers.

2 vCores (M30)

Storage (GiB) 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536
Max IOPS 3,750 3,750 3,750 3,750 3,750 3,750 3,750 3,750 3,750 3,750 3,750 3,750
Max throughput (MB/s) 85 85 85 85 85 85 85 85 85 85 85 85

4 vCores (M40)

Storage (GiB) 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536
Max IOPS 6,400 6,400 6,400 6,400 6,400 6,400 6,400 6,400 6,400 6,400 6,400 6,400
Max throughput (MB/s) 145 145 145 145 145 145 145 145 145 145 145 145

8 vCores (M50)

Storage (GiB) 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536
Max IOPS 12,800 12,800 12,800 12,800 12,800 12,800 12,800 12,800 12,800 12,800 12,800 12,800
Max throughput (MB/s) 290 290 290 290 290 290 290 290 290 290 290 290

16 vCores (M60)

Storage (GiB) 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536
Max IOPS 16,000 25,600 25,600 25,600 25,600 25,600 25,600 25,600 25,600 25,600 25,600 25,600
Max throughput (MB/s) 600 600 600 600 600 600 600 600 600 600 600 600

32 vCores (M80)

Storage (GiB) 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536
Max IOPS 16,000 32,000 51,200 51,200 51,200 51,200 51,200 51,200 51,200 51,200 51,200 51,200
Max throughput (MB/s) 865 865 865 865 865 865 865 865 865 865 865 865

64 vCores (M200)

Storage (GiB) 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536
Max IOPS 16,000 32,000 64,000 80,000 80,000 80,000 80,000 80,000 80,000 80,000 80,000 80,000
Max throughput (MB/s) 1,200 1,200 1,200 1,200 1,200 1,200 1,200 1,200 1,200 1,200 1,200 1,200

Prerequisites

  • An Azure subscription

    • If you don't have an Azure subscription, create a Trial
  • An existing Azure DocumentDB cluster

  • If you prefer to run CLI reference commands locally, install the Azure CLI. If you're running on Windows or macOS, consider running Azure CLI in a Docker container. For more information, see How to run the Azure CLI in a Docker container.

    • If you're using a local installation, sign in to the Azure CLI by using the az login command. To finish the authentication process, follow the steps displayed in your terminal. For other sign-in options, see Sign in with the Azure CLI.

    • When you're prompted, install the Azure CLI extension on first use. For more information about extensions, see Use extensions with the Azure CLI.

    • Run az version to find the version and dependent libraries that are installed. To upgrade to the latest version, run az upgrade.

Create a cluster with high performance storage

Configure a cluster using Premium SSD v2 (high performance) storage as part of the cluster creation step.

  1. Sign in to the Azure portal (https://portal.azure.cn).

  2. From the Azure portal menu or the Home page, select Create a resource.

  3. On the New page, search for and select Azure DocumentDB.

    Screenshot of the Azure portal search feature to locate Azure DocumentDB.

  4. On the Create Azure DocumentDB cluster page and within the Basics section, select the Configure option within the Cluster tier section.

    Screenshot of the options available to configure an Azure DocumentDB cluster.

  5. On the Configure page, choose the cluster tier and storage size as required. Select the storage type as Premium SSD v2 (preview) to enable high-performance storage, then select Save to apply the changes.

    Screenshot of the configuration option specific to premium SSD v2 disks in Azure DocumentDB.

  6. Fill in the remaining details and then select Review + create.

  7. Review the settings you provide, and then select Create. It takes a few minutes to create the cluster. Wait for the resource deployment is complete.

  8. Finally, select Go to resource to navigate to the Azure DocumentDB cluster in the portal.

Screenshot of the deployment completion step with an option to navigate to the new Azure DocumentDB cluster.

  1. Open a new terminal.

  2. Sign in to Azure CLI.

  3. Create a new Bicep file to define your role definition. Name the file main.bicep.

  4. Add this template to the file's content. Replace the <cluster-name>, <location>, <username>, and <password> placeholders with appropriate values.

    resource cluster 'Microsoft.DocumentDB/mongoClusters@2025-08-01-preview' = {
      name: '<cluster-name>'
      location: '<location>'
      properties: {
        administrator: {
          userName: '<username>'
          password: '<password>'
        }
        serverVersion: '8.0'
        storage: {
          sizeGb: 32
          type: 'PremiumSSDv2'
        }
        compute: {
          tier: 'M30'
        }
        sharding: {
          shardCount: 1
        }
        highAvailability: {
          targetMode: 'Disabled'
        }
      }
    }
    
  5. Deploy the Bicep template using az deployment group create. Specify the name of the Bicep template and replace the <resource-group> placeholder with the name of your target Azure resource group.

    az deployment group create \
        --resource-group "<resource-group>" \
        --template-file main.bicep
    
  6. Wait for the deployment to complete. Review the output from the deployment.

  1. Open a new terminal.

  2. Sign in to Azure CLI.

  3. Check your target Azure subscription.

    az account show
    
  4. Define your cluster in a new Terraform file. Name the file cluster.tf.

  5. Add this resource configuration to the file's content. Replace the <cluster-name>, <resource-group>, and <location> placeholders with appropriate values.

    variable "admin_username" {
      type        = string
      description = "Administrator username for the cluster."
      sensitive   = true
    }
    
    variable "admin_password" {
      type        = string
      description = "Administrator password for the cluster."
      sensitive   = true
    }
    
    terraform {
      required_providers {
        azurerm = {
          source  = "hashicorp/azurerm"
          version = "~> 4.0"
        }
      }
    }
    
    provider "azurerm" {
      features {}
    }
    
    data "azurerm_resource_group" "existing" {
      name = "<resource-group>"
    }
    
    resource "azurerm_mongo_cluster" "cluster" {
      name                   = "<cluster-name>"
      resource_group_name    = data.azurerm_resource_group.existing.name
      location               = "<location>"
      administrator_username = var.admin_username
      administrator_password = var.admin_password
      shard_count            = "1"
      compute_tier           = "M30"
      high_availability_mode = "Disabled"
      storage_size_in_gb     = "32"
      storage_type           = "PremiumSSDv2"
      version                = "8.0"
    }
    

    Tip

    For more information on options using the azurerm_mongo_cluster resource, see azurerm provider documentation in Terraform Registry.

  6. Initialize the Terraform deployment.

    terraform init --upgrade
    
  7. Create an execution plan and save it to a file named cluster.tfplan. Provide values when prompted for the admin_username and admin_password variables.

    ARM_SUBSCRIPTION_ID=$(az account show --query id --output tsv) terraform plan --out "cluster.tfplan"
    

    Note

    This command sets the ARM_SUBSCRIPTION_ID environment variable temporarily. This setting is required for the azurerm provider starting with version 4.0 For more information, see subscription ID in azurerm.

  8. Apply the execution plan to deploy the cluster to Azure.

    ARM_SUBSCRIPTION_ID=$(az account show --query id --output tsv) terraform apply "cluster.tfplan"
    
  9. Wait for the deployment to complete. Review the output from the deployment.

  1. Open a new terminal.

  2. Sign in to Azure CLI.

  3. Create a new JSON file named cluster.json.

  4. Add this document to the file's content. Replace the <location>, <username>, and <password> placeholders with appropriate values.

    {
      "location": "<location>",
      "properties": {
        "administrator": {
          "userName": "<username>",
          "password": "<password>"
        },
        "serverVersion": "8.0",
        "storage": {
          "sizeGb": 32,
          "type": "PremiumSSDv2"
        },
        "compute": {
          "tier": "M30"
        },
        "sharding": {
          "shardCount": 1
        },
        "highAvailability": {
          "targetMode": "Disabled"
        }
      }
    }
    
  5. Use the az rest Azure CLI command to create a new cluster with the configuration specified in the JSON file. Specify the name of the JSON file as the body of the request and replace the following placeholders:

    Description
    <subscription-id> The unique identifier of your target Azure subscription
    <resource-group> The name of your target Azure resource group
    <cluster-name> The unique name of your new Azure DocumentDB cluster
    az rest \
        --method "GET" \
        --url "https://management.chinacloudapi.cn/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.DocumentDB/mongoClusters/<cluster-name>/users?api-version=2025-08-01-preview" \
        --body @cluster.json
    

    Tip

    Use az account show to get the unique identifier of your target Azure subscription.

  6. Wait for the deployment to complete. Review the output from the deployment.

Limitations of high performance storage

Here are limitations of the high performance storage feature:

  • High availability (HA) isn't supported 

  • Replica clusters aren't supported

  • Customer-managed keys (CMK) aren't supported

  • The Azure portal renders storage size but doesn't render effective IOPS/throughput

  • High performance storage is available in a limited subset of Azure regions

Considerations for high performance storage

Consider these things when using high performance storage in your Azure DocumentDB cluster:

  • High performance storage can get the maximum performance for your selected compute/storage combination for the fixed price per 1 GiB of storage / month. For more information, see Azure DocumentDB pricing.