Cassandra vs MongoDB

Decision criteria.

Overview

Cassandra and MongoDB are both NoSQL databases solving different problems. Cassandra is a wide-column store optimised for write-heavy distributed workloads (IoT, time-series, audit logs); MongoDB is a document store optimised for flexible schema and rich queries (catalogue, content, application data). Picking the right one at design time avoids the migration that costs an engineer-quarter at year three.

The approach

Workload-driven choice, prototype with real data, plan the data model upfront because both stores reward design-time access-pattern thinking. Cassandra rewards getting the partition key right; MongoDB rewards getting the secondary indexes right. Document the rationale per database.

Why this compounds

The right database choice compounds across years. Wrong choices pay performance or migration penalties indefinitely; right choices pay neither. Cross-database tooling (operational runbooks, capacity planning) gets built once per engine and reused. By year two the choice is automatic per workload.