I'm Working on a spring/java webapp using cassandra as backend; the app would be used by potentially hundreds of customers simultaneously.
I see that default Cluster PoolingOptions connection pool settings (With protocol v3) are:
LOCAL hosts: core = max = 1
REMOTE hosts: core = max = 1
And default maxRequestsPerConnection setting (With protocol v3) is:
1024 for LOCAL hosts, and 256 for REMOTE hosts.
Will these default settings be sufficient to fulfill our usage requirements?
If not, What poolingoptions can I start with?
I would recommend using the default PoolingOptions
. It should not really be touched unless you have a good reason.
Note that the configuration is per host, not for the entire cluster.
Also, by default cassandra only processes 128 native transport requests at a time (native_transport_max_threads), so configuring PoolingOptions
to handle more than 1024 requests per connection has low utility.
Finally, during benchmarking and high throughput scenarios with a small number of nodes, increasing the number of connections per host to something like 8 can show some improvement in throughput, but as you add more C* hosts that improvement becomes marginal.