ScyllaDB University Live | Free Virtual Training Event
Learn more
ScyllaDB Documentation Logo Documentation
  • Server
  • Cloud
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Download
ScyllaDB Docs ScyllaDB C# driver Features Native protocol

Native protocol¶

The native protocol defines the format of the binary messages exchanged between the driver and Cassandra over TCP. As a driver user what you need to be aware of is that some Cassandra features are only available with a specific protocol version, but if you are interested in the technical details you can check the specification in the Cassandra codebase.

Controlling the protocol version¶

By default, the driver uses the highest protocol version supported by the driver and the Cassandra cluster. If you want to limit the protocol version to use, you do so in the protocol options.

var cluster = Cluster.Builder()
                     .AddContactPoint("host1")
                     .WithMaxProtocolVersion(ProtocolVersion.V4)
                     .Build();

Mixed cluster versions and rolling upgrades¶

The protocol version used between the client and the Cassandra cluster is negotiated upon establishing the first connection. For clusters with nodes running mixed versions of Cassandra and during rolling upgrades this could represent an issue that could lead to limited availability.

To exemplify the above, consider a mixed cluster having nodes running either Cassandra 2.1 or 2.0.

  • The first contact point is a 2.1 host, so the driver negotiates native protocol version 3

  • While connecting to the rest of the cluster, the driver contacts a 2.0 host using native protocol version 3, which fails; an error is logged and this host will be permanently ignored.

For these scenarios, mixed version clusters and rolling upgrades, it is strongly recommended to set the maximum protocol version when initializing the client:

var cluster = Cluster.Builder()
                     .AddContactPoint("host1")
                     .WithMaxProtocolVersion(ProtocolVersion.V2)
                     .Build();

And switching it to the highest protocol version once the upgrade is completed, by leaving the maximum protocol version unspecified or by using ProtocolVersion.MaxSupported:

var cluster = Cluster.Builder()
                     .AddContactPoint("host1")
                     .WithMaxProtocolVersion(ProtocolVersion.MaxSupported)
                     .Build();

Was this page helpful?

PREVIOUS
List of metrics
NEXT
OpenTelemetry
  • Create an issue
  • Edit this page

On this page

  • Native protocol
    • Controlling the protocol version
    • Mixed cluster versions and rolling upgrades
ScyllaDB C# driver
  • master
    • master
  • Features
    • Address resolution
    • Authentication and Authorization
    • Automatic failover
    • Column Encryption
    • Driver components
      • ADO.NET
      • Core component
        • Statements
          • Batch statements
          • Per-query keyspace
          • Prepared statements
          • Simple statements
      • Linq component
        • Batch statements with LINQ
      • Mapper component
        • Batch statements with the Mapper
    • Connection heartbeat
    • Connection pooling
    • CQL data types to C# types
      • Date and time representation
      • Nulls and unset
    • Execution Profiles
    • Graph support
    • Cluster and schema metadata
    • Metrics
      • App.Metrics Provider
      • List of metrics
    • Native protocol
    • OpenTelemetry
    • Result paging
    • Parameterized queries
    • Query timestamps
    • Query warnings
    • Request Tracker
    • Routing queries
    • Speculative query execution
    • TLS/SSL
    • Tuning policies
    • User-defined functions and aggregates
    • User-defined types
    • Vector support
  • FAQ
  • Upgrade Guide
  • Examples
  • API Reference
Docs Tutorials University Contact Us About Us
© 2025 ScyllaDB | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 01 Aug 2025.
Powered by Sphinx 7.4.7 & ScyllaDB Theme 1.8.7
Ask AI