Cassandra configuration files location varies, depending on the
type of installation:
confdirectory within the tarball install location
Cassandra’s default configuration file,
cassandra.yaml, is sufficient
to explore a simple single-node
cluster. However, anything beyond
running a single-node cluster locally requires additional configuration
to various Cassandra configuration files. Some examples that require
non-default configuration are deploying a multi-node cluster or using
clients that are not running on a cluster node.
cassandra.yaml: the main configuration file for Cassandra
cassandra-env.sh: environment variables can be set
cassandra-topology.properties: set rack and datacenter information for a cluster
logback.xml: logging configuration including logging levels
jvm-*: a number of JVM configuration files for both the server and clients
commitlog_archiving.properties: set archiving parameters for the
Two sample configuration files can also be found in
metrics-reporter-config-sample.yaml: configuring what the metrics-report will collect
cqlshrc.sample: how the CQL shell, cqlsh, can be configured
Configuring Cassandra is done by setting yaml properties in the
cassandra.yaml file. At a minimum you should consider setting the
cluster_name: Set the name of your cluster.
seeds: A comma separated list of the IP addresses of your cluster
storage_port: Check that you don’t have the default port of 7000 blocked by a firewall.
listen addressis the IP address of a node that allows it to communicate with other nodes in the cluster. Set to localhost by default. Alternatively, you can set
listen_interfaceto tell Cassandra which interface to use, and consecutively which address to use. Set one property, not both.
native_transport_port: Check that you don’t have the default port of 9042 blocked by a firewall, so that clients like cqlsh can communicate with Cassandra on this port.
The following yaml properties control the location of directories:
data_file_directories: One or more directories where data files, like
commitlog_directory: The directory where commitlog files are located.
saved_caches_directory: The directory where saved caches are located.
hints_directory: The directory where
For performance reasons, if you have multiple disks, consider putting commitlog and data files on different disks.
JVM-level settings such as heap size can be set in
You can add any additional JVM command line argument to the
environment variable; when Cassandra starts, these arguments will be
passed to the JVM.
The default logger is logback. By default it will log:
INFO level in
DEBUG level in
When running in the foreground, it will also log at INFO level to the
console. You can change logging properties by editing
by running the nodetool setlogginglevel command.