Search code examples
cassandradatastaxcassandra-3.0

Cassandra client driver timeout parameters


I observed the following timeout parameters in Cassandra driver,

counter_write_request_timeout_in_ms: 5000
range_request_timeout_in_ms: 10000
request_timeout_in_ms: 10000

1) Could somebody explain what are these timeout in Cassandra driver?
2) What is the difference between request and read / write timeout?


Solution

  • There is a list here regarding the most important timeout parameters in Cassandra, but to also explain your question here:

    • range_request_timeout_in_ms: The time that the coordinator waits for sequential or index scans to complete.

    • counter_write_request_timeout_in_ms The time that the coordinator waits for counter writes to complete. e.g: writing a table with counter column (counter is a special column for storing a number that is changed in increments.) Here you can find a good explanation on why the counter write needs separate timeout parameter.

    • read_request_timeout_in_ms: The time that the coordinator waits for read operations to complete.

    • write_request_timeout_in_ms: The time that the coordinator waits for write operations to complete.

    • request_timeout_in_ms: The default time for other, miscellaneous operations.

    Note:

    1) Coordinator: A node that receives a client query; it facilitates communication between all replica nodes responsible for the query (contacting at least n replica nodes to satisfy the query’s consistency level) and prepares and returns a result to the client.

    2) The timeout parameters are defined per node base (in cassandra.yaml) and not per client based.