I want to know how to explicitly set the maximum pool size in gocql
?
What I mean is changing the number of queries running simultaneously.
We see 200ms
average response time in Grafana, but we see 24ms
average read latency in the Cassansra exporter panel. Is it related to pool size?
PS I think this is a function in the Java driver: poolingOptions.setMaxRequestsPerConnection(num)
. What is the equivalent function in gocql?
I don't think there is an equivalent in gocql to the Cassandra Java driver's setMaxRequestsPerConnection()
.
gocql defaults to 2 connections per host (NumConns: 2
in cluster.go
), on the server side, Cassandra will accept up to 128 Concurrent requests (native_transport_max_threads: 128<code>
in cassandra.yaml). cheers!
The above is the detailed content of How to set max pool size in gocql?. For more information, please follow other related articles on the PHP Chinese website!