Scylla University Live | July 28 & 29 Free Virtual Training Event
Learn More >

Scylla Go Driver

The Scylla Go driver is shard aware and contains extensions for a tokenAwareHostPolicy supported by Scylla 2.3 and onwards. It is is a fork of the GoCQL Driver but has been enhanced with capabilities that take advantage of Scylla’s unique architecture. Using this policy, the driver can select a connection to a particular shard based on the shard’s token. As a result, latency is significantly reduced because there is no need to pass data between the shards.

The protocol extension spec is available here. The Scylla Go Driver is a drop-in replacement for gocql. As such, no code changes are needed to use this driver. All you need to do is rebuild using the replace directive in your mod file.

To download and install the driver, visit the Github project.

Using CDC with Go

When writing applications, you can now use our Go Library to simplify writing applications that read from Scylla CDC.

More information

  • Scylla Gocql Driver project page on GitHub - contains the source code as well as a readme and documentation files.

  • Scylla University: Golang and Scylla

    A three-part course with in-depth examples from executing a few basic CQL statements with a Scylla cluster using the Gocql driver, to the different data types that you can use in your database tables and how to store these binary files in Scylla with a simple Go application.