Driver policies

The Java driver provides several policies to configure behavior. Some of the policies are as follows:

  • Load-balancing policy: This determines which Cassandra host to contact for each query. The policy is made aware of any changes in the cluster topology. They ensure that downed nodes are excluded and decommissioned, or removed nodes are removed from the connection pool.
  • Retry policy: This determines the course of action whenever failures occur. It's usually triggered when a timeout or host unavailable exception happens. This minimizes exception handling from our side by automating query retry of failures.
  • Reconnection policy: This policy decides how often reconnection to a dead node is attempted.

Get Learning Apache Cassandra - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.