ScyllaDB University Live | Free Virtual Training Event
Learn more
ScyllaDB Documentation Logo Documentation
  • Deployments
    • Cloud
    • Server
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Install
Ask AI
ScyllaDB Docs ScyllaDB CPP-Rust Driver Configuration Connection

Connection¶

Heartbeats¶

To prevent intermediate network devices (routers, switches, etc.) from disconnecting pooled connections the driver sends a lightweight heartbeat request (using an OPTIONS protocol request) periodically. By default the driver sends a heartbeat every 30 seconds. This can be changed or disabled (0 second interval) using the following:

CassCluster* cluster = cass_cluster_new();

/* Change the heartbeat interval to 1 minute */
cass_cluster_set_connection_heartbeat_interval(cluster, 60);

/* Disable heartbeat requests */
cass_cluster_set_connection_heartbeat_interval(cluster, 0);

/* ... */

cass_cluster_free(cluster);

Heartbeats are also used to detect unresponsive connections. An idle timeout setting controls the amount of time a connection is allowed to be without a successful heartbeat before being terminated and scheduled for reconnection. This interval can be changed from the default of 60 seconds:

CassCluster* cluster = cass_cluster_new();

/* Change the idle timeout to 2 minute */
cass_cluster_set_connection_idle_timeout(cluster, 120);

/* ... */

cass_cluster_free(cluster);

It can be disabled by setting the value to a very long timeout or by disabling heartbeats.

Was this page helpful?

PREVIOUS
Speculative Execution
NEXT
Execution Profiles
  • Create an issue
  • Edit this page

On this page

  • Connection
    • Heartbeats
ScyllaDB CPP-Rust Driver
  • master
    • master
  • CPP-over-Rust Driver
  • API Documentation
    • CassAggregateMeta
    • CassAuthenticator
    • CassAuthenticatorCallbacks
    • CassBatch
    • CassCluster
    • CassCollection
    • CassColumnMeta
    • CassCustomPayload
    • CassDataType
    • CassErrorResult
    • CassExecProfile
    • CassFunctionMeta
    • CassFuture
    • CassIndexMeta
    • CassInet
    • CassIterator
    • CassKeyspaceMeta
    • CassLogMessage
    • CassMaterializedViewMeta
    • CassMetrics
    • CassNode
    • CassPrepared
    • CassResult
    • CassRetryPolicy
    • CassRow
    • CassSchemaMeta
    • CassSession
    • CassSpeculativeExecutionMetrics
    • CassSsl
    • CassStatement
    • CassTableMeta
    • CassTimestampGen
    • CassTuple
    • CassUserType
    • CassUuid
    • CassUuidGen
    • CassValue
    • CassVersion
  • Getting Started
  • Architecture Overview
  • Installation
  • Building
  • Testing
  • Using the Driver
    • Batches
    • Binding Parameters
    • Client-side timestamps
    • Consistency
    • Data Types
      • The date and time Types
      • Tuples
      • User-Defined Types (UDTs)
      • UUIDs
    • Futures
    • Handling Results
    • Keyspaces
    • Prepared Statements
    • Schema Metadata
  • Configuration
    • Load balancing
    • Retry policies
    • Speculative Execution
    • Connection
    • Execution Profiles
    • Performance Tips
    • Client Configuration
  • Security
    • Authentication
    • TLS
  • Observability
    • Logging
    • Tracing
    • Metrics
Docs Tutorials University Contact Us About Us
© 2025, ScyllaDB. All rights reserved. | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 16 Sep 2025.
Powered by Sphinx 7.4.7 & ScyllaDB Theme 1.8.8
Ask AI