What is Azure Cosmos DB?

Azure Cosmos DB is Microsoft’s fully managed, globally distributed database service, available exclusively on Azure. Microsoft manages partitioning, replication, failover, patching, and scaling. Applications access data through APIs for NoSQL, MongoDB (RU), Apache Cassandra, Gremlin, or Table. A separate MongoDB vCore offering uses a different capacity model and is not billed in request units.

Two features shape how developers work with Cosmos DB. Capacity is expressed as request units per second (RU/s) rather than servers or instances. Its default indexing policy also indexes every property in each document, allowing most fields to be queried without configuring indexes first. For qualifying point operations on items of 1 KB or less in Direct mode, Cosmos DB provides a financially backed SLA for latency below 10 ms at the 99th percentile.

This model works well for teams that want to move quickly with minimal infrastructure management. Developers can start without a rigid schema, query data flexibly, and leave much of the database operation to Microsoft.

Related content: Read our guide to NoSQL databases

What is Apache Cassandra?

Apache Cassandra is an open source, masterless wide-column database. It became an Apache Software Foundation top-level project in 2010. Every node has the same role, removing a single point of failure and allowing capacity to scale by adding nodes. Cassandra distributes data according to the partition key, while replication is configured for each keyspace.

Organizations can operate Cassandra themselves or use a managed service. Costs are generally tied to provisioned infrastructure: node count and size, storage, networking, and any management or support fees. Query activity is not directly metered. Cassandra itself has no license fee and can run on AWS, Azure, Google Cloud, or on-premises.

That portability depends on the managed provider. Some services run standard open source Apache Cassandra, while others use proprietary forks or Cassandra-compatible storage engines. This distinction matters if avoiding infrastructure or database lock-in is a migration goal.

Related content: Read our guide to Apache Cassandra

Cosmos DB vs Cassandra: Side-by-side comparison

The table summarizes the differences most relevant to teams evaluating Cassandra because of Cosmos DB cost or portability concerns. The edge indicates which system generally performs better for that specific requirement rather than an overall winner.

Dimension Azure Cosmos DB Apache Cassandra Edge
Cost predictability Variable. Query patterns and RU consumption can significantly change required throughput Primarily capacity-based; query activity does not directly change billing unless more infrastructure is required Cassandra
Cost of a modeling mistake Poor partitioning can cause fan-out and increasing RU consumption Usually appears as latency, uneven load, or capacity pressure Cassandra
Entry and spiky workloads Serverless and autoscale support low-volume and bursty workloads Provisioned nodes continue to cost money while idle Cosmos DB
Cost of strong consistency Strong and Bounded Staleness double read RU consumption Higher consistency primarily affects latency at a fixed replication factor Cassandra
Query flexibility Supports ad-hoc queries across indexed properties Query-first design; important new access patterns commonly require new tables Cosmos DB
Cloud portability Azure-only Open source and deployable across clouds or on-premises Cassandra
Operational responsibility Microsoft manages most database infrastructure, although teams still own modeling, indexing, and throughput decisions Significant responsibility when self-managed; managed services can reduce it Cosmos DB

1. Cosmos DB vs Cassandra pricing

Pricing is often the main reason teams compare these databases, but the two aren’t sold the same way. Cosmos DB is a fully managed Azure service that bills for the database operations you run, measured in request units. Apache Cassandra is open-source software with no license fee, so you pay for the infrastructure it runs on.

This section compares Cosmos DB with open-source Cassandra run by a managed provider such as NetApp Instaclustr. The provider operates the cluster while you keep standard Apache Cassandra and its capacity-based pricing. Self-hosting uses the same pricing model without the management fee, but your team takes on repairs, upgrades, scaling and on-call support. Commercial Cassandra distributions have their own licensing and aren’t covered here.

How Cosmos DB Bills: Request Units

Cosmos DB assigns a request unit (RU) cost to every read, write, query and delete. With provisioned throughput, you pay for an RU/s budget whether you use it or not. With serverless, you pay for the RUs you consume. The cost of an operation depends on document size, query complexity, indexing, consistency level and partition scope.

Several mechanics matter most when estimating production costs:

  • Queries cost more than point reads. A point read of a 1 KB item costs 1 RU. Fetching the same item through the query engine typically costs about 2.5–3 RU because of query overhead.
  • Cross-partition queries get more expensive as the container grows. A query that doesn’t include the partition key must run against every physical partition. Each partition adds at least about 2.5 RU, even when it returns nothing, so the cost rises as data spreads across more partitions.
  • Strong consistency doubles read costs. Reads under Strong and Bounded Staleness consistency consume twice the RUs of reads under weaker levels.
  • Indexing adds to write cost. Cosmos DB indexes every property by default, so documents with many properties cost more RU per write. Limiting the indexing policy to the fields your application actually queries can substantially reduce write costs.

How Managed Cassandra Bills: Provisioned Capacity

With a managed provider such as Instaclustr, you pay per node, based on node size, cloud provider and region. You can run in the provider’s cloud account for an all-inclusive per-node price. Alternatively, you can run in your own account, paying the provider a management fee and the cloud provider for infrastructure. Either way, the bill reflects the cluster you provision, not the queries you run. Self-hosting follows the same logic, with infrastructure costs plus your team’s time.

Individual operations aren’t metered:

  • Inefficient queries consume CPU and I/O from capacity you’ve already paid for. They can slow the application, but they only raise the bill if they force you to add nodes.
  • Higher consistency levels wait for acknowledgements from more replicas. At a fixed replication factor, this costs latency rather than money. Raising the replication factor itself does add storage and possibly nodes.
  • Indexes and extra tables consume storage and processing capacity. They aren’t billed per operation.
  • Scaling means adding nodes, so costs grow in known steps that you can price before you scale.

Example: The Same Reporting Feature on Cosmos DB and Managed Cassandra

Consider an application that stores user activity and was designed around user-centric lookups. A new reporting feature queries activity by date and generates 100 queries per second. The dataset grows from a small development dataset to 2 TB in production.

On Cosmos DB, the container is partitioned by /userId. Because date isn’t the partition key, every reporting query fans out across all physical partitions. In development, the container occupies one physical partition, and each query costs about 10 RU. At 2 TB, the data spans roughly 40 physical partitions, and fan-out raises the cost to about 400 RU per query.

On managed Cassandra, the team adds a second table partitioned by date for the reporting access pattern, and the application writes each activity record to both tables. Each reporting query then reads a single date partition, whether the table holds 20 GB or 2 TB.

Cosmos DB: development Cosmos DB: production Managed Cassandra: development Managed Cassandra: production
Data size Small (1 physical partition) 2 TB (~40 physical partitions) Small 2 TB
How the date query runs Cross-partition query, little fan-out Fans out to ~40 partitions Single-partition read on the date table Single-partition read on the date table
Cost per query ~10 RU ~400 RU Not metered Not metered
Capacity needed for this feature 1,000 RU/s 40,000 RU/s Negligible Extra storage for the date table (× replication factor) and a second write per record
Added monthly cost — ~$2,280 for the extra 39,000 RU/s — $0 if the cluster has headroom; otherwise the cost of the added nodes, known before you scale

The Cosmos DB figure assumes a list price of $0.008 per 100 RU/s per hour for a single-region write account. At that price, the extra 39,000 RU/s costs $3.12 per hour, or roughly $2,280 per month. The query itself hasn’t changed. It costs more because the data now spans many more physical partitions, and the cost will keep rising as the container grows.

On Cassandra, the cost of the feature is paid up front and in capacity terms: the date table duplicates the reporting data and roughly doubles writes for it. That cost grows with data volume, not with the query pattern, and it’s visible before you commit to more nodes. The trade-off is that Cassandra required the team to design the extra table. Cosmos DB answered the new query immediately and passed the cost to the bill instead.

Why Partition Keys Drive Cosmos DB Cost

Cosmos DB groups items into logical partitions by partition-key value and distributes them across physical partitions. A physical partition can hold up to 50 GB of data and serve up to 10,000 RU/s. Cosmos DB automatically adds and rebalances physical partitions as storage and throughput needs grow.

This makes some partitioning problems hard to catch during development. When all data sits in one physical partition, a cross-partition query has almost no fan-out. As the container grows to hundreds of gigabytes or terabytes, the same query runs across dozens of physical partitions, and its RU cost rises accordingly. Changing the partition key later means rewriting and repartitioning the data.

The problem typically surfaces when an application built around user lookups later adds reporting by date, status, region or another dimension. In Cassandra, each important access pattern gets its own table, so the cost appears as storage and write capacity that you can plan for. In Cosmos DB, queries that don’t match the partition key become steadily more expensive as the container grows.

2. Cosmos DB vs. Cassandra consistency levels compared

Both databases let applications trade consistency against latency and throughput, but their models differ significantly. Cosmos DB exposes five predefined consistency levels. Cassandra lets clients choose how many replicas participate in individual operations.

Cosmos DB: Five Named Levels

Cosmos DB provides Strong, Bounded Staleness, Session, Consistent Prefix, and Eventual consistency. Session is the default and provides read-your-own-writes behavior within a client session, making it suitable for many application workloads.

Strong and Bounded Staleness have an important pricing consequence: reads consume twice the request units of reads using Session, Consistent Prefix, or Eventual consistency. Both require additional replica work to provide their guarantees. Strong offers linearizable reads, while Bounded Staleness limits how far reads can lag behind writes.

Applications with high read volumes therefore need to include consistency requirements in RU capacity planning. Choosing stronger consistency is not only a latency and throughput decision in Cosmos DB; it can also change database cost.

Cassandra: Tunable per Statement

Cassandra exposes consistency as the number of replicas that must respond before a read or write succeeds. Applications can choose the consistency level for each statement. A common rule for strong read-after-write consistency is R + W > RF, where R is the number of replicas involved in the read, W is the number acknowledging the write, and RF is the replication factor.

In a single datacenter, applications commonly use QUORUM for reads and writes when quorum consistency is required. Multi-datacenter deployments can use LOCAL_QUORUM to obtain quorum behavior within the local datacenter. Conditional operations that require linearizability use Cassandra lightweight transactions, which rely on Paxos.

At a fixed replication factor, changing consistency affects latency and resource consumption rather than introducing a direct billing multiplier. Increasing the replication factor itself does consume more storage and cluster capacity because additional copies of the data must be maintained.

3. Cosmos DB vs. Cassandra data modeling differences

Data modeling is one of the largest practical differences between Cosmos DB and Cassandra. Cosmos DB favors flexible querying, while Cassandra expects tables to be designed around known access patterns.

Cosmos DB: Convenience Now, Cost Later

Cosmos DB indexes every document property by default. This lets developers query many fields without defining indexes first, which is useful while requirements and access patterns are still changing.

That flexibility has costs. Maintaining more indexes increases write RU consumption. More importantly, the partition key selected early in development determines how efficiently queries can be routed as the dataset grows. Queries that do not align with it may fan out across physical partitions.

Changing the partitioning strategy later is more involved than adding an index. Data generally needs to be moved into a container with the new partition-key design, so early modeling choices can have long-term operational and financial consequences.

Cassandra: Discipline Now, Predictability Always

Cassandra uses query-first data modeling. Tables are designed for specific access patterns. If an application retrieves orders by user, date, and status, it may maintain separate tables optimized for each query instead of relying on one normalized representation.

The partition key determines where data is stored and defines the scope of efficient operations. Teams must keep partitions bounded and distribute data evenly to prevent hot spots. Cassandra does not automatically divide an oversized logical partition into smaller application-level partitions, so these limits need to be considered during schema design.

Secondary indexing options are available, including Storage-Attached Indexes in Cassandra 5.0. They expand query flexibility but do not remove the need for query-first modeling on critical, high-volume access paths.

The Reframe for Teams Burned by Cosmos DB Billing

Cassandra’s requirement to define access patterns before creating tables can appear restrictive. For teams seeking predictable database economics, that restriction also forces inefficient access patterns to be addressed during design rather than after production growth changes their cost.

This limitation applies primarily to CQL data access, not to the broader analytics ecosystem. Cassandra can integrate with Apache Spark through the Spark Cassandra Connector, while Cassandra Analytics provides another path for analytical processing of SSTable data through the Sidecar.

For Cosmos DB, Microsoft Fabric mirroring provides a zero-ETL analytical path that avoids consuming transactional RU for analytical queries. Synapse Link is no longer supported for new Cosmos DB projects.

Related content: Read our guide to data modeling with Storage-Attached Indexes

How to choose between Cosmos DB and Cassandra

The right choice depends on workload characteristics and which constraints matter most. Cosmos DB provides flexible querying and extensive infrastructure automation. Cassandra trades some of that flexibility for explicit data modeling, infrastructure portability, and predictable capacity planning.

Cosmos DB Makes Sense When

  • Workload volume is spiky or difficult to predict, making serverless or autoscale useful.
  • Flexible queries across multiple properties are important.
  • MongoDB, Gremlin, Table, or other Cosmos DB APIs are central to the application.
  • A financially backed latency SLA for qualifying point operations is a business requirement.
  • The organization is committed to Azure and wants minimal database infrastructure management.
  • Access patterns are still changing significantly during early development.

Cassandra Makes Sense When

  • RU consumption makes database spending difficult to predict.
  • Workloads are steady, high-volume, or write-heavy.
  • The database must run across different clouds or on-premises.
  • Important access patterns are known well enough for query-first modeling.
  • The team can operate Cassandra or use a managed provider to handle cluster operations.

The central trade-off is where constraints appear. Cosmos DB permits more flexible access patterns, but inefficient choices can surface later as increased RU consumption. Cassandra requires more deliberate schema design before deployment, but that design makes infrastructure requirements and costs easier to reason about as workloads grow.

Neither database is universally better. The decision depends on whether the application benefits more from Cosmos DB’s managed flexibility or Cassandra’s explicit modeling and capacity-based operating model.

Why teams move from Cosmos DB to Cassandra

Most teams considering Cassandra already have a working Cosmos DB deployment. Cosmos DB may have served them well during early development, but application growth can expose cost and architectural constraints that were less visible at smaller scale. Four issues commonly drive an evaluation.

1. Unpredictable Request Unit Billing

Cosmos DB charges operations according to their request unit consumption. With provisioned throughput, expensive queries can cause throttling through HTTP 429 responses or require more RU/s to be provisioned. With serverless or autoscale configurations, increased resource consumption can translate more directly into higher costs.

Cassandra does not meter individual queries. An inefficient query consumes CPU, memory, and I/O from infrastructure that is already provisioned. Poor queries still need to be fixed because they can increase latency or exhaust capacity, but they do not generate a separate per-query charge unless the resulting load requires additional infrastructure.

2. Partition-Key Mistakes Get Expensive

Partition-key selection has a major effect on Cosmos DB economics. Queries that cannot target the relevant partition may fan out across physical partitions. As the number of physical partitions increases, the RU cost of these operations can increase as well.

A poor partition model also causes problems in Cassandra, but the consequences are primarily operational. It can produce large partitions, uneven load, or slow queries. The problem still requires redesign, but it normally appears as a capacity or latency issue rather than an immediate per-operation billing increase.

3. Costs Explode at Scale, Not in Development

Partitioning problems can remain hidden while a dataset is small. A development container may use only one physical partition, making a poorly scoped query relatively inexpensive. As production data grows and Cosmos DB divides the container across more physical partitions, the same query may need to execute across many partitions.

Cassandra capacity is provisioned as infrastructure. As demand grows, teams add nodes and can estimate the additional cost before scaling. This does not eliminate performance problems, but it makes the relationship between infrastructure capacity and spending more explicit.

4. Azure Lock-In

Cosmos DB is an Azure service. Applications that depend directly on its APIs, consistency model, and operational behavior need database-layer changes if the organization later moves away from Azure.

Apache Cassandra is open source and can run on AWS, Azure, Google Cloud, or on-premises. This gives organizations more control over where the database runs and makes infrastructure portability possible without replacing the underlying database engine.

What migrating from Cosmos DB to Cassandra involves

Using the Cosmos DB API for Apache Cassandra does not make migration to Apache Cassandra a connection-string change. The API provides Cassandra protocol compatibility over the Cosmos DB storage engine. Data is not stored as Cassandra SSTables, and Cosmos DB does not participate in Cassandra’s native gossip-based replication.

A migration therefore requires several distinct steps:

  • Schema review. CQL definitions may transfer, but the underlying data model needs review. A schema designed around Cosmos DB limits can create partitions that are too large for efficient Cassandra operation. Partition size and access patterns should be evaluated before data is moved.
  • Consistency and replication configuration. Apache Cassandra requires explicit decisions about replication factor and the consistency levels used by reads and writes. These settings need to be mapped from the application’s existing Cosmos DB behavior.
  • Historical data load. Because the databases cannot form a shared Cassandra ring, existing data needs to be exported and bulk-loaded. Spark and the Cassandra Connector are common tools for this process. Applications that depend on original write timestamps need a migration method that preserves them explicitly.
  • Cutover. Low- or zero-downtime migrations typically use dual writes while historical data is copied. Teams validate source and target data, redirect reads to Cassandra, monitor the new deployment, and then retire the Cosmos DB account.

Wire-protocol compatibility reduces some application changes, but it does not remove the need for migration planning. Schema validation is particularly important because a partitioning strategy that behaved acceptably in Cosmos DB may not be appropriate for a native Cassandra cluster.

Understanding managed Cassandra options

Cassandra requires operational work such as repairs, compaction management, upgrades, monitoring, and node replacement. Teams that do not want to manage these tasks can use a managed Cassandra service while retaining capacity-based infrastructure economics.

Three areas deserve particular attention when evaluating providers.

1. Is It Actually Open Source Cassandra?

Some managed services run standard Apache Cassandra, while others provide proprietary forks or Cassandra-compatible engines. Protocol compatibility does not necessarily provide storage-engine portability.

If avoiding database lock-in is a migration objective, confirm that the service runs Apache Cassandra and that data can be moved to another Cassandra deployment using standard tooling and formats.

2. Which Clouds Does It Run On?

Azure Managed Instance for Apache Cassandra is distinct from the Cosmos DB API for Apache Cassandra. It runs open source Apache Cassandra and uses instance-based infrastructure pricing rather than request units. It also exposes Cassandra’s native consistency and replication behavior.

This can suit organizations that want to eliminate RU billing while remaining on Azure. It does not, however, address cloud-provider portability because the managed service itself remains Azure-specific.

Managed providers operating across AWS, Azure, Google Cloud, or on-premises can preserve more deployment flexibility. This matters when avoiding dependence on one cloud is a primary reason for migrating.

3. What Does the Pricing Model Actually Cover?

Capacity-based pricing is only predictable when teams understand what is included. Check whether backups, monitoring, upgrades, support, storage, and network usage are included in the quoted node price or charged separately.

A service with numerous usage-based add-ons can reintroduce variable costs even when the database nodes themselves use fixed-capacity pricing.

Running Apache Cassandra with NetApp Instaclustr

If capacity-based pricing and cloud portability are what you want from Cassandra, but operational overhead is what is holding you back, NetApp Instaclustr provides a fully managed service for Apache Cassandra hosted in the cloud or on-premises, delivering a production-ready and fully supported cluster in minutes. 

The underlying engine provided by Instaclustr is 100% open source Apache Cassandra, so you keep the predictable node-based pricing and the freedom to move that motivated the evaluation, without acquiring a different kind of lock-in.

Key capabilities of Instaclustr for Apache Cassandra:

  • Fully managed, 100% open source: Run stock Apache Cassandra in your own cloud account or ours, with no proprietary fork and no vendor-specific storage format.
  • Deployment on any major cloud or on-premises: Available on AWS, Microsoft Azure, Google Cloud, or in your own data center.
  • Availability SLA up to 100%: Up to 100% availability for LOCAL_QUORUM consistency operations, with a 99% latency SLA on read and write transactions to Instaclustr-maintained tables and custom latency SLAs negotiable.
  • 24x7x365 monitoring and expert support: A dedicated team of Cassandra operators monitors your cluster continuously and is alerted whenever action or investigation is required.
  • Optimized configuration: Cluster configurations tuned for reliability, performance and security, with optimal instance types on each cloud and continuous backups available to reduce disaster recovery RPO.
  • DevOps-friendly provisioning: Provision via console, REST API or the Terraform provider, with monitoring through the Prometheus API or integrations with common monitoring platforms.
  • Zero downtime migrations: NetApp guides and assists customers in migrating Cassandra clusters onto the platform, drawing on hundreds of customer transitions completed without downtime.
  • Compliance and certification: SOC 2, ISO 27001 and ISO 27018 certified, PCI-DSS and HIPAA compliant, and meeting GDPR requirements.
  • Cassandra 5.0 with vector search: Access to Storage-Attached Indexes and vector search capabilities for AI and similarity-search workloads.
  • MCP Gateway: Standardized, governed access to your Cassandra data infrastructure for AI applications and agents.

Learn more about Apache Cassandra on the NetApp Instaclustr managed platform