Driver retry policies

DataStax driver retry policies increase application error recovery and prevent unnecessary load.

Retry policies automatically allow DataStax drivers to retry requests upon encountering server errors such as read timeouts, write timeouts, and unavailable exceptions.

When the load balancing policy encounters a server error, it designates a node as a coordinator for the request. The coordinator routes the request to the replicas and returns the response to the driver.

Default driver retry policies

Each DataStax driver implements a default retry policy. Some drivers allow extended retry policies in addition to those already included to implement custom behavior.

The default retry policy retries a request when it is safe to do so while preserving the consistency level of the original request. Default retry policies are recommended for use in most deployments.

Driver-specific retry policies

Retry policies are defined within the drivers. Policies vary depending on the programming language and the specific driver implementation.

For driver-specific retry policies, see the appropriate documentation:

Language Retry Policies

python Python

By default, retries are managed by the .Cluster.default_retry_policy set on the session Cluster. It can also be specialized per statement by setting the .Statement.retry_policy. Retries are attempted on the same coordinator.

For more information about the Python driver retry policies, see the DataStax API documentation.

nodejs Node.js

For more information about the Node.js driver retry policies, see GitHub.

java Java

For more information about the Java driver retry policies, see GitHub.

cpp C++

For more information about the C++ driver retry policies, see GitHub.

csharp C#

For general driver retry policy information, see the DataStax driver documentation.

For more information about the default retry policy and other driver retry policies, see the DataStax API documentation.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com