Skip to main content

Cassandra Connection Settings

Introduction

This document describes the available configuration settings of the Helios FHIR Server for connecting to a Cassandra cluster. A Cassandra cluster may be as simple as a single Cassandra node, or a collection of Cassandra nodes.

There are three ways to configure these configuration settings.

  • Manually modify the $KARAF_HOME/etc/cassandra.properties.cfg file prior to startup.
  • Use the Helios FHIR Server administrative user interface (Default - http://localhost:8181/ui), Settings menu to view or modify these values. Changes to these values in the administrative user interface will overwrite the values in cassandra.properties.cfg.
  • Use environment variables to override the cassandra.properties.cfg values. This approach is helpful when you need to pass configuration values to a Docker container or otherwise do not wish to modify the values in the cassandra.properties.cfg file.

Each setting section below lists two values.

  • The first is the cassandra.properties.cfg value, and
  • the second is the same value expressed as an environment variable.

The values listed are the default values as distributed in the Helios FHIR Server tarball download and Docker image.

Cassandra Connection Settings

Port

The listening port for Cassandra clients to connect. See native_transport_port in cassandra.yaml.

port=9042
CASSANDRA_PROPERTIES_PORT=9042

SSL

If true, use SSL to connect to Cassandra. See client_encryption_options in cassandra.yaml.

ssl=false
CASSANDRA_PROPERTIES_SSL=false

Contact Points

Contact points are addresses of Cassandra nodes. The list of contact points should be comma-separated and in hostname:port format. Example node1:port,node2:port,... The default client port for Cassandra is 9042 and may be omitted.

contactPoints=localhost
CASSANDRA_PROPERTIES_CONTACTPOINTS=localhost

System Keyspace

The Cassandra keyspace that holds Helios FHIR Server system tables necessary for its operation.

systemKeyspace=hfs_system
CASSANDRA_PROPERTIES_SYSTEMKEYSPACE=hfs_system

Data Keyspace

The Cassandra keyspace that holds FHIR Resource and Search Parameter tables and data types.

dataKeyspace=hfs_data
CASSANDRA_PROPERTIES_DATAKEYSPACE=hfs_data

Data Center

The name of the Cassandra datacenter.

dataCenter=datacenter1
CASSANDRA_PROPERTIES_DATACENTER=datacenter1

Fetch Size

The number of results in a Bundle returned per FHIR Search Query Page. This capability is implemented using Cassandra's Paging capability and this value is sent to the Java driver as the basic.request.page-size driver configuration option.

fetchSize=5000
CASSANDRA_PROPERTIES_FETCHSIZE=5000

Username

The username used to connect to Cassandra, if any. This value is not used by default.

username=
CASSANDRA_PROPERTIES_USERNAME=

Password

The username's password used to connect to Cassandra, if any. This value is not used by default.

password=
CASSANDRA_PROPERTIES_PASSWORD=

Request Timeout in Milliseconds

Number of milliseconds allowed before the client driver returns a request timeout.

requestTimeoutInMs=5000
CASSANDRA_PROPERTIES_REQUESTTIMEOUTINMS=5000

Replication Factor

Cassandra replicates every partition of data to many nodes across the cluster to maintain high availability and durability according to a Replication Strategy. Used when creating the Data and System Keyspaces initially, this value defines the number of replicas of data. The Helios FHIR Server uses Cassandra's SimpleStrategy.

replicationFactor=1
CASSANDRA_PROPERTIES_REPLICATIONFACTOR=1