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

C++

See C++ driver retry policies.

C#

See C# driver retry policy and DefaultRetryPolicy.

Go

See Go driver RetryPolicy.

Java

See Java driver Retries.

Node.js

See Node.js driver RetryPolicy.

Python

By default, retries are managed by the .Cluster.default_retry_policy set on the session cluster. To specialize the retry policy for a specific statement, set the .Statement.retry_policy. Retries are attempted on the same coordinator.

For more information, see Python driver RetryPolicy.

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