Skip to main content
Apache Cassandra is a highly scalable, distributed NoSQL database designed for handling large amounts of data across many commodity servers with no single point of failure. It supports vector storage for semantic search capabilities in AI applications and can scale to massive datasets with linear performance improvements.

Usage

Using DataStax Astra DB

For managed Cassandra with DataStax Astra DB:
When using DataStax Astra DB, provide the secure connect bundle path. Contact points and localDataCenter are not needed when a secure connect bundle is provided.

Config

Here are the parameters available for configuring Apache Cassandra:
The TypeScript SDK uses camelCase keys: contactPoints, collectionName, embeddingModelDims, secureConnectBundle, protocolVersion, and loadBalancingPolicy. It also requires localDataCenter (for example, datacenter1) when you connect with contactPoints instead of a secure connect bundle. The Node.js driver needs this to route queries; it has no default.

Setup

Option 1: Local Cassandra Setup using Docker:

Option 2: DataStax Astra DB (Managed Cloud):

  1. Sign up at DataStax Astra
  2. Create a new database
  3. Download the secure connect bundle
  4. Generate an application token
For production deployments, use DataStax Astra DB for fully managed Cassandra with automatic scaling, backups, and security.

Option 3: Install Cassandra Locally:

Ubuntu/Debian:
macOS:

Client Installation

Install the driver for your SDK:

Performance Considerations

  • Replication Factor: For production, use replication factor of at least 3
  • Consistency Level: Balance between consistency and performance (QUORUM recommended)
  • Partitioning: Cassandra automatically distributes data across nodes
  • Scaling: Add nodes to linearly increase capacity and performance

Advanced Configuration

For production use, configure appropriate replication strategies and consistency levels based on your availability and consistency requirements.