Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to optimize cross shard queries for scylla db using gocql

Tags:

go

cql

gocql

scylla

I'm using a scylla cluster with 9 nodes and replication factor to be 3. One application opens one connections to it, reading and writing data.

However, I notice in the scylla CQL optimization monitoring dashboard, the percentage for cross shard is very high, around 150%.

Is that normal or how can I optimize it.

like image 866
SilentCanon Avatar asked Nov 24 '25 02:11

SilentCanon


1 Answers

First, there is an issue with this metric, and it was removed in the latest dashboard https://github.com/scylladb/scylla-monitoring/issues/659

Second, the way to reduce cross-shard messages is using Token Aware drivers, if you can. There are two Token Aware drivers at the moment: Go and Java https://docs.scylladb.com/using-scylla/scylla_drivers/

like image 156
Tzach Livyatan Avatar answered Nov 27 '25 14:11

Tzach Livyatan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!