Running Cassandra in Docker with prorm

Read this page in the documentation

Running Cassandra in Docker with prorm prorm reaches Cassandra through CassandraStore, a wide-column implementation of the NoSqlStore interface. Queries are CQL, which looks like SQL but is deliberately much more restricted. Start the container Cassandra is slow to start — a JVM plus gossip bootstrap, typically 40-90 seconds. Budget for it in CI. Waiting for readiness docker ps showing "healthy" is not sufficient — CQL accepts connections after the port opens. Create a keyspace There is no environment variable for this; create it before connecting: SimpleStrategy with RF 1 is for local development only. Production uses NetworkTopologyStrategy with a replication factor per data centre. Dependencies Connect and use the store localDataCenter is not optional — the default load-balancing policy refuses to start without it, and the single-node image names its DC datacenter1. What CQL will not do Cassandra's restrictions are design, not omissions: No joins, no subqueries. Denormalise instead. WHERE only on the partition key and clustering columns, unless you add a secondary index or append ALLOW FILTERING — which scans the cluster and should not reach production. No ORDER BY on arbitrary columns — only clustering columns, in their defined order. Design the table around the query you need, not the entity you have. Tear down Troubleshooting Symptom | Cause | --- | --- | NoHostAvailableError right after start | Still bootstrapping. Poll cqlsh, not the port. | localDataCenter could not be determined | Set it explicitly; the image uses datacenter1. | Keyspace 'app' does not exist | The image creates none — run the CREATE KEYSPACE above. | Container killed on start | Cassandra wants ~2 GB; raise the Docker memory limit. | ALLOW FILTERING demanded | The WHERE is not on the partition key — remodel the table. | Related reading Cassandra store NoSQL stores overview