A common application architecture places an API in Azure App Service and uses Azure Cosmos DB for operational JSON data. The application uses a supported SDK, managed identity where available, and private networking when required. Regional application deployments should align SDK region preferences with the database's replication topology.
For ingestion, Azure Event Hubs provides a buffer between producers and database writers. Consumers validate events, choose partition keys, and write at a rate that respects available throughput. After data is committed, Azure Functions can process the change feed to update derived views or downstream systems. Use idempotent processing and explicit deletion handling rather than assuming exactly-once delivery or a complete event history.
Azure AI Search can maintain a separate retrieval index when applications need search-specific ranking and indexing capabilities. Azure Monitor provides metrics, logs, and alerts for throttling, latency, and capacity planning. Azure Backup complements native recovery with isolated long-term protection. Treat search freshness, ingestion lag, backup retention, and restore testing as explicit operational requirements.
Azure Functions
Use the Azure Cosmos DB trigger for Azure Functions to process supported change feed events without running a dedicated polling service. For example, update an order summary whenever an order document changes. Configure the lease container and throughput, and make handlers idempotent because changes can be delivered more than once.
Event Hubs
Use Event Hubs to buffer incoming telemetry or application events before a consumer writes them to Azure Cosmos DB. For example, a Functions or stream-processing consumer can validate device events and update each device's current-state document. Coordinate consumer concurrency with available RU/s, and use stable identifiers or conditional updates to handle replay safely.
App Service
Host an application API in App Service and access Azure Cosmos DB through a supported SDK. For example, a catalog API can use managed identity and NoSQL data-plane roles to read product documents without storing account keys. Reuse SDK clients and configure App Service networking and private DNS when accessing a private endpoint.
Azure Monitor
Send Azure Cosmos DB metrics and diagnostic logs to Azure Monitor for operational visibility. For example, alert on sustained throttling and correlate normalized RU consumption, request latency, and application failures to identify hot partitions or insufficient capacity. Enable only the required diagnostic categories and manage log retention to control monitoring costs.
Azure Backup
Use Azure Backup to protect supported Azure Cosmos DB accounts with vaulted backups isolated from the production account. For example, retain immutable recovery copies for regulatory requirements that exceed native continuous-backup retention. Configure retention, authorization safeguards, and recovery procedures, then test restores independently of regional failover.
API Management
Azure Cosmos DB for NoSQL can serve as a direct REST backend for API Management. An API gateway can authenticate to Cosmos DB with a managed identity and expose selected item operations without a separate application backend.
Azure Advisor
Azure Cosmos DB accounts receive resource-specific recommendations in Azure Advisor. For example, Advisor can identify eligible workloads that could save money by switching from standard provisioned throughput to autoscale.
Azure AI Bot Service
Azure Cosmos DB for NoSQL provides persistent bot state through the Bot Framework's Cosmos DB partitioned storage provider. A bot can resume a conversation after a restart or continue it on another instance.
Azure Analysis Services
Azure Cosmos DB for NoSQL data can be imported into an Azure Analysis Services tabular model through the Azure Cosmos DB Power Query connector. For example, product documents can become a table in a semantic model used for reporting.
Azure App Testing
Azure Cosmos DB can be added as an application component in Azure Load Testing, part of Azure App Testing. During a test, database metrics such as request counts and request-unit consumption can be compared with application latency and errors.
Azure Blob Storage
Azure Cosmos DB stores periodic backups in Azure Blob Storage managed by the service. It can also archive diagnostic logs to a customer-selected Azure Storage account, such as for long-term retention of database request logs.
Azure Chaos Studio
Azure Cosmos DB accounts with a supported multi-region configuration can be targeted by the Cosmos DB failover fault in Chaos Studio. An experiment can move the write region to verify that applications reconnect and resume writes.
Azure Container Apps
Azure Cosmos DB can persist state for Azure Container Apps through the Cosmos DB state-store component in managed Dapr. For example, a container app can save workflow state through Dapr and recover it after a replica restarts.
Azure Data Factory
Azure Cosmos DB can act as a source or destination in Azure Data Factory pipelines through its built-in connectors. For example, a pipeline can transform incoming records and write them to a Cosmos DB for NoSQL container.
Azure Database Migration Service
Azure Cosmos DB for MongoDB can be a migration destination for supported MongoDB sources in Azure Database Migration Service. An online migration can copy collections and synchronize subsequent changes before cutover.
Azure Databricks
Azure Cosmos DB for NoSQL has a Spark connector that lets Azure Databricks read and write container data and consume the change feed. A streaming job can process changed items as they arrive instead of repeatedly scanning the container.
Azure DevOps
Azure Cosmos DB provides an emulator that can run in Azure Pipelines for integration testing. A build can exercise container operations against the emulator without opening access to a production database or consuming its throughput.
Azure DNS
Azure Cosmos DB private endpoints use API-specific Azure Private DNS zones to resolve account names to private IP addresses. A private DNS zone group can maintain the records that clients need for the account's regional endpoints.
Azure DocumentDB
Azure Cosmos DB for MongoDB accounts that use request-unit throughput can serve as a source for migration to Azure DocumentDB. This gives applications a migration path to a MongoDB-compatible, vCore-based service.
Azure ExpressRoute
Azure Cosmos DB's public endpoints can be reached from on-premises over ExpressRoute Microsoft peering. If the account uses IP firewall rules, it can allow the public NAT addresses used by that peering.
Azure Firewall
Azure Cosmos DB publishes the AzureCosmosDB service tag for use in Azure Firewall network rules. A rule can allow outbound traffic to Cosmos DB service IP ranges without maintaining individual prefixes.
Azure IoT Hub
Azure Cosmos DB for NoSQL containers can be configured as custom endpoints for IoT Hub message routing. A route can write selected device telemetry directly into a container without an intermediary application.
Azure Key Vault
Azure Cosmos DB can use a customer-managed key in Azure Key Vault as an additional layer of encryption at rest. Applications can also store Cosmos DB credentials in Key Vault instead of embedding them in configuration files.
Azure Kubernetes Service (AKS)
Azure Cosmos DB can be connected to workloads on Azure Kubernetes Service through Service Connector. The connection sets up the supported authentication and supplies the database connection settings to the workload.
Azure Policy
Azure Cosmos DB has built-in Azure Policy definitions for auditing and enforcing account settings. For example, a policy can require public network access to be disabled or audit accounts that do not use customer-managed keys.
Azure portal
Azure Cosmos DB has dedicated account management and Data Explorer experiences in the Azure portal. From the portal, you can configure replication and throughput or open a container to query its items.
Azure Private Link
Azure Cosmos DB supports Private Link endpoints that give clients private IP addresses for database access in a virtual network. Public network access can be disabled so clients connect through the private endpoints.
Azure Resource Manager
Azure Cosmos DB accounts, databases, containers, and other child resources can be provisioned as Azure Resource Manager resource types. A declarative deployment can create a NoSQL container with its partition key, indexing policy, and throughput settings.
Azure role-based access control (Azure RBAC)
Azure Cosmos DB uses Azure RBAC to control management operations such as updating account settings or listing account keys. Azure Cosmos DB for NoSQL also has native data-plane roles that can grant access to a database or container without giving the caller account keys.
Azure Service Health
Azure Cosmos DB account availability is reported through Resource Health in Azure Service Health. Service Health also reports regional Cosmos DB incidents and planned maintenance that affect a subscription.
Azure Spring Apps
Azure Cosmos DB can be wired to an Azure Spring Apps workload through Service Connector. It supplies the connection configuration for the chosen Cosmos DB API, so the application does not need to hard-code the endpoint or credentials.
Azure SRE Agent
Azure Cosmos DB has a workload troubleshooting capability built on Azure SRE Agent. It can correlate client telemetry with database diagnostics when investigating symptoms such as increased request latency or throttling.
Azure Stream Analytics
Azure Cosmos DB for NoSQL is a built-in output for Azure Stream Analytics jobs. A job can write filtered events or rolling aggregates directly to a container that an application queries.
Azure Synapse Analytics
Azure Cosmos DB can expose operational data to Azure Synapse Analytics through Synapse Link. Synapse Spark and serverless SQL can query the analytical store without consuming the provisioned throughput used by transactional queries.
Azure Virtual Network
Azure Cosmos DB can restrict access to selected Azure Virtual Network subnets through virtual network rules and the Azure Cosmos DB service endpoint. The account's public endpoint then accepts traffic from the permitted subnets under those rules.
Foundry Agent Service
Azure Cosmos DB can store conversation and agent state in a customer-owned account for supported Foundry Agent Service setups. This keeps persisted agent state in the customer's Azure resources.
HDInsight
Azure Cosmos DB for NoSQL can be read from and written to by HDInsight Spark jobs through the Cosmos DB Spark connector. A batch job can process documents in parallel and write the results to a separate container.
Logic Apps
Azure Cosmos DB has a Logic Apps connector with database actions such as querying, creating, or updating documents. A workflow can look up an order document and record the result of an approval in the same container.
Microsoft Defender for Cloud
Azure Cosmos DB accounts can be protected by the Defender for Azure Cosmos DB plan in Microsoft Defender for Cloud. The plan detects suspicious database activity, such as unusual access or potential extraction of sensitive data, and raises security alerts.
Microsoft Entra ID (formerly Azure AD)
Azure Cosmos DB for NoSQL accepts Microsoft Entra tokens for data-plane access by users, service principals, and managed identities when they have the required data roles. A Cosmos DB account can also use its own managed identity to access a customer-managed key.
Microsoft Fabric
Azure Cosmos DB for NoSQL can continuously replicate supported operational data into OneLake through Fabric Mirroring. Fabric can query the mirrored data for analytics without running those queries against the operational containers.
Microsoft Foundry
Azure Cosmos DB can be attached as a customer-managed resource in a Microsoft Foundry project configured for standard agents. The project supplies the Cosmos DB connection used to persist agent state in the customer's account.
Microsoft Purview
Azure Cosmos DB for NoSQL can be registered and scanned as a data source in Microsoft Purview. A scan catalogs database and container metadata so users can discover those assets in the data catalog.
Microsoft Sentinel
Azure Cosmos DB diagnostic logs can be ingested through the Azure Cosmos DB connector in Microsoft Sentinel. Security teams can investigate database activity alongside identity, network, and application logs.