liveBook · Manning

Cassandra cluster

As explained in Spring in Action, Sixth Edition

A Cassandra cluster is a group of Cassandra nodes that operate together as a database system.

A Cassandra cluster is a group of Cassandra nodes that operate together as a complete database system. Applications connect to the cluster through Spring Data Cassandra, whose starter enables Cassandra repository autoconfiguration with minimal explicit configuration. section 4.1.1

A practical development setup follows these steps:

  • Replace relational persistence dependencies with the Spring Data Cassandra starter. section 4.1.1
  • Run a single-node cluster in Docker when no existing cluster is available. section 4.1.1
  • Create a keyspace for repositories; a keyspace groups Cassandra tables and uses replication and durable-write settings. section 4.1.1
  • Configure the keyspace name, local datacenter, and, for a multi-node deployment, contact points, port, and credentials. section 4.1.1
$ docker network create cassandra-net
$ docker run --name my-cassandra \
             --network cassandra-net \
             -p 9042:9042 \
             -d cassandra:latest

Use the Docker commands to create a network and start a single-node Cassandra cluster with port 9042 exposed. section 4.1.1

How Spring in Action, Sixth Edition covers it

How deep it goes
Explains cluster roles, Docker startup, keyspace creation, and connection properties, but stops short of cluster internals.
Examples
Uses a Docker single-node cluster, the tacocloud keyspace, CQL shell commands, and Spring YAML connection settings.
What it assumes
Assumes Docker and basic Spring configuration, while defining clusters, keyspaces, and repository autoconfiguration.
What you can do after
Operate/configure a development cluster and connect Spring Data Cassandra repositories to a chosen keyspace.
How it connects
Connects Cassandra clusters with Spring Data Cassandra, repositories, keyspaces, Cassandra Query Language, Docker, and datacenters.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring in Action, Sixth Edition. The section links point to the parts of the book it draws on.