skip to main content
Using the Driver : Using Failover in a Cluster
  

Try DataDirect Drivers Now

Using Failover in a Cluster

To ensure availability to Cassandra data sources, the driver supports connection failover and client load balancing when connecting to clusters:
*Connection failover provides protection for new connections to a cluster. If a member node of the cluster is unavailable, for example, because of hardware failure or traffic overload, the driver fails over to another member node to attempt the connection. If a connection to a node is dropped, the driver does not fail over the connection.
*Client load balancing helps distribute new connections in your environment so that no one server is overwhelmed with connection requests. When client load balancing is enabled, the order in which member nodes are tried is random.
You can enable connection failover and load balancing by specifying a list of the member nodes for your cluster using the Cluster Nodes (ClusterNodes) option. The list should be comprised of a comma-separated server names or IP addresses for your member nodes and their corresponding port numbers. Note that IPv6 values must be wrapped in double quotation marks. For example:
ClusterNodes=server1:9042,255.125.1.11:9043,"2001:DB8:0000:0000:8:800:200C:417A":9044
Note: Specifying a value for the Cluster Nodes option can be used in place of or in addition to the values of the Host Name (HostName) and Port Number (PortNumber) options. If values are specified all of these options, the node specified by the Host Name and Port Number are included in the list of nodes to which the driver randomly attempts to connect.
When connection failover and load balancing are enabled, the driver randomly selects a node from the list to first attempt a connection. If that connection fails, the driver again randomly selects another node from this list until all the nodes in the list have been tried or a connection is successfully established.