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):
- Sign up at DataStax Astra
- Create a new database
- Download the secure connect bundle
- Generate an application token
Option 3: Install Cassandra Locally:
Ubuntu/Debian: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