So let’s say we have a Cassandra three node cluster, in the cassandra.properties file you can list a single or multiple contact points. What is the difference and how do they work?

Anne Ramey

The contact points setting is used by the application to make an initial connection to the Cassandra cluster. Once the application connects to a node, it will "discover" the rest of the nodes in the cluster (Cassandra nodes in a cluster are aware of one another). The application then connects to any/all of the nodes, as needed.

If only one node is specified, and it goes down, any attempts to restart KDRequest (or to start a new instance) will fail. Once an application is up and running, it will failover to talking to other nodes.

It is typically considered a good practice for the application contact points to match the "seed nodes" configuration of Cassandra (which should also be the same for all nodes in the cluster). Generally there will be 3 seed nodes per cluster. If there are only 3 nodes in the cluster, all nodes would be a seed. As more nodes are added, the seed nodes are not changed.

For our hosted instance, we use 3 seed nodes / contact points, one in each of the AWS availability zones that we use (spreading the seeds between physical locations, when possible, helps to ensure that a location outage doesn't affect the application's ability to connect to the Cassandra cluster).