Retry Policies

Retry policies allow Ruby Driver to retry a request upon encountering specific types of server errors, namely, write timeout, read timeout or unavailable.

Text Diagram

Read Timeout

When a coordinator received the request and sent the read to replica(s) but the replica(s) did not respond in time.

Text Diagram

In this scenario, Cassandra::Retry::Policy#read_timeout will be used to determine the desired course of action.

Write Timeout

When a coordinator received the request and sent the write to replica(s) but the replica(s) did not respond in time.

Text Diagram

In this scenario, Cassandra::Retry::Policy#write_timeout will be used to determine the desired course of action.

Unavailable

When the coordinator is aware there aren’t enough replica online. No requests are sent to replica nodes in this scenario, because coordinator knows that the requested consistency level cannot be possibly satisfied.

Text Diagram

In this scenario, Cassandra::Retry::Policy#unavailable will be used to determine the desired course of action.