Skip to content

Commit a20c4f0

Browse files
committed
examples/perf: use 1 connection per shard
The `perf` example has demonstrated an antipattern of using 1 connection per host, which is not recommended for production use in case of ScyllaDB. This commit updates the example to use 1 connection per shard, which is the recommended practice for ScyllaDB.
1 parent 6c94f6a commit a20c4f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/perf/perf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ CassCluster* create_cluster(const char* hosts) {
137137
cass_cluster_set_credentials(cluster, "cassandra", "cassandra");
138138
cass_cluster_set_num_threads_io(cluster, NUM_IO_WORKER_THREADS);
139139
cass_cluster_set_queue_size_io(cluster, 10000);
140-
cass_cluster_set_core_connections_per_host(cluster, 1);
140+
cass_cluster_set_core_connections_per_shard(cluster, 1);
141141
return cluster;
142142
}
143143

0 commit comments

Comments
 (0)