Apache Cassandra is a highly-scalable, distributed NoSQL database designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure.
Cassandra Anti-Patterns Overview
Using a Relational Data Model
Using Secondary Indexes Excessively
Using ALLOW FILTERING
ALLOW FILTERING
forces Cassandra to scan all data and filter results in memory, which is extremely inefficient for large datasets. Instead, design your data model to support your query patterns without requiring filtering.Using Wide Rows Without Pagination
Using Lightweight Transactions Excessively
IF
conditions) in Cassandra are much slower than regular operations because they require a Paxos consensus protocol. Use them only when absolutely necessary for operations that truly require conditional updates.Using Timeuuid Incorrectly
TIMEUUID
type for clustering columns to get automatic time-based ordering. This allows for efficient range queries based on time periods.Not Using Prepared Statements
Using Collection Columns for Large Data Sets
Not Using Batches Correctly
Not Considering Tombstones
Not Using Proper Consistency Levels
Not Monitoring and Tuning Cassandra
Not Planning for Data Growth