Function cassandra_cpp_sys::cass_cluster_set_latency_aware_routing_settings [] [src]

pub unsafe extern "C" fn cass_cluster_set_latency_aware_routing_settings(
    cluster: *mut CassCluster,
    exclusion_threshold: cass_double_t,
    scale_ms: cass_uint64_t,
    retry_period_ms: cass_uint64_t,
    update_rate_ms: cass_uint64_t,
    min_measured: cass_uint64_t
)

Configures the settings for latency-aware request routing.

Defaults:

  • exclusion_threshold: 2.0
  • scale_ms: 100 milliseconds
  • retry_period_ms: 10,000 milliseconds (10 seconds)
  • update_rate_ms: 100 milliseconds
  • min_measured: 50

@public @memberof CassCluster

@param[in] cluster @param[in] exclusion_threshold Controls how much worse the latency must be compared to the average latency of the best performing node before it penalized. @param[in] scale_ms Controls the weight given to older latencies when calculating the average latency of a node. A bigger scale will give more weight to older latency measurements. @param[in] retry_period_ms The amount of time a node is penalized by the policy before being given a second chance when the current average latency exceeds the calculated threshold (exclusion_threshold * best_average_latency). @param[in] update_rate_ms The rate at which the best average latency is recomputed. @param[in] min_measured The minimum number of measurements per-host required to be considered by the policy.