I wanted to know how can we explicitly set max pool size in gocql
?
I mean changing the number of queries which will be run simultaneously.
We are having 200ms
avg response time in Grafana, but we are seeing 24ms
avg read latency in Cassansra exporter panels. Can it be related to pool size?
P.S. I think that's the function in Java driver: poolingOptions.setMaxRequestsPerConnection(num)
. What is the equivalent function in gocql?
I don't think there is an equivalent of the Cassandra Java driver's setMaxRequestsPerConnection()
in gocql.
The gocql default is 2 connections per host (NumConns: 2
in cluster.go
) and on the server-side, Cassandra will accept up to 128 concurrent requests (native_transport_max_threads: 128
in cassandra.yaml
). Cheers!